Tiopon said:
Are you saying these as MUSHclient variables or internal variables? Are your variables being done as a table or individual items? If you're doing them as a table, you can serialize it when it gets updated and have your script file automatically load it when you open your world... it's what I do for some of my persistent tables. It lives as a table, but serializes itself as a variable every time it updates, and the world script file automatically loads the variable. I can copy-paste some of those examples if you're doing it as a table... but if it's just individual variables, my suggestion is to use actual world variables instead of keeping them as global (unsaved) variables... Also lets you easily see/change the variables yourself without needing to use the var.lua file...
This are individual internal variables.I only need four of them saved so I'm thinking a table would be overkill,but if it gets the job done I'll use a table
How would I go about ussing them as world variables?Couldn't this cause problems with other scripts.
Tiopon said:
So this is in a plugin, okay... Based on the link that Nick posted, last post, if that's your whole script file, you're missing the header completely... the <plugin> tag comes long before the <script> section. That may be the problem...
I'ts not the actual script I just wanted to give an idea how I'm doing it now.The script would be to long to post here.The script sends coloured stuff the mud
(like: gt I would @r love @w a cookie ) where in @r and @w are the colour codes. In the script this looks like:
Send ("gt I would"..cl1.." loves "..cl2.." a cookie")
Where cl1 and cl2 are the variables wich hold @r and @w
I'm trying to change the variables with an alias like 'setcolour cl1 @g'
Hope this clears it up a bit.
What would be the best way to go about it?
Thanks for the help.