Original Post
I want to be able to work with several lua scripts. If several scripts have functions or variables with the same names, I have to make sure they do not override each other. As far as I understand, I need several lua states and/or threads for this, but I could not find all the info I need, neither in the lua nor in the luabind docs. What I'd like to have when I'm finished is sth like this: Each script should have its own set of variables and functions, and all scripts should have access to a global set of variables. How can I achieve this? Any recommended reads on this apart from the official docs? Thank you!
Script *pScript = AddScript( "script.lua" );
ExecuteScript( pScript, "Update" );