|
On 30 Nov 2012, at 11:15, Philipp Kraus wrote:
The C++ side then assigns that returned function a name - the name of the script seems sensible.
This will be exactly the same except instead of main, you will use the name used in lua_setglobal when you loaded the script. This way you will have one Lua state, with all the scripts loaded, and the ability to call whichever you need to. However, you need to make sure your scripts don't write any global variables, otherwise the different scripts may interfere with each other. Thanks, Kevin |