Lua globals in C(++)
Hi!
I'm currently starting to test out lua for my game engine, but I've run into a problem. How can I iterate over all the global variables in a lua_State in C++?
Thanks :)
Global variables simply make up a Lua table, one which is located at the lua stack pseudoindex LUA_GLOBALS (that might not be exactly the right name... check the reference manual). So just iterate over that the way you would iterate over any table.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement