From GetPluginVariable
I am just wondering, is there any simple way to set a "global" MUSHclient variable from inside a plugin?
I can pull the info with GetPluginVariable, but i can't find any way to set it.
Searching the forums i have found a lot about serializing tables, but that is way more than i need. And I'm not entirely sure if it would save it in "global", or the plugin's save state file.
I ask because i would like to allow some stupidly simple plugins to store/share simple variables in the world file itself. Instead of the 150+ plugin state files i currently have.
Thanks for any help you can give me.
*Edit* I understand not wanting plugins to interfere with each other, but nothing i do will be distributed, so it isn't an issue for me. And for my personal use, some interaction would be helpful.
PS, Your GetPluginVariable Lua example has a mistake.
If you are writing a plugin and want to find a "global" MUSHclient variable value, use an empty plugin ID, eg.
world.Note world.GetPluginVariable ("", "target")I am just wondering, is there any simple way to set a "global" MUSHclient variable from inside a plugin?
I can pull the info with GetPluginVariable, but i can't find any way to set it.
Searching the forums i have found a lot about serializing tables, but that is way more than i need. And I'm not entirely sure if it would save it in "global", or the plugin's save state file.
I ask because i would like to allow some stupidly simple plugins to store/share simple variables in the world file itself. Instead of the 150+ plugin state files i currently have.
Thanks for any help you can give me.
*Edit* I understand not wanting plugins to interfere with each other, but nothing i do will be distributed, so it isn't an issue for me. And for my personal use, some interaction would be helpful.
PS, Your GetPluginVariable Lua example has a mistake.
MyName = GetPluginVariable ("a42fbf74f394d8129df956ae", "MyName")
if MyName == nil then
Note("MyName is not defined")
else
note(MyName)
end