scripting engines and scripting variables

Posted by Tspivey on Sat 13 Aug 2005 03:20 AM — 3 posts, 19,576 views.

Canada #0
If I use a variable in a scripting language, say lua, without using the MushClient's variable interface,
will that variable last throughout my session only, or until the script engine is re-loaded, or until
the end of the current script? I don't need MC's variables to save there state, and
there interface is sort of clunky. How often will the engine reload and lose my variables?
sorry if this has been asked before, but I thought it would be important for other scripters.
Thanks,
Tspivey
USA #1
They will stay until you reload the scripting engine.

Which, will only happen each time your world is opened. Unless you have errors, then the script reloads (and if you change your script file, you have to reload to update the script). Of course, you can also reload manually.
Australia Forum Administrator #2
See the post linked below. If you use this method the Lua variables effectively become MUSHclient variables and would be saved when the plugin saves state.

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4904