Thanks for the info, I didn't know that module. That will sure help in other situations...
Nick Gammon said:
Your original question mentioned one variable. There could be other ways, why are you trying to share 100 variables between a plugin and global script space? Maybe that can be redesigned.
I tried to make it a little simpler than it really was. The specific function I was working on uses 5 'global' variables, which isn't bad to expose as global. The 100 I mentioned are all variables I use on script file, but I'm sure I don't need all of them exposed.
Nick Gammon said:
There are ways for the main script file (or main triggers and aliases) to communicate with plugins. One is CallPlugin.
This lets you pass information down to plugins.
(function=CallPlugin)
Another is to "Execute" an alias, which the plugin then captures.
For example:
TellMyPlugin canStab = false
That could match an alias in your plugin (TellMyPlugin *) which might execute the rest of the line as Lua code. That could be dangerous, but it is an example of what you might do .
So many possibilities. I liked and tried this execute as an alias and it worked perfectly. Just a small issue, and I'm not sure it was just a feeling, I noticed a little delay on the execution of the alias, but nothing too bad.
Thanks again for all the info you two.