c++ Programming Glossary: lua_tostring
How to create nested Lua tables using the C API http://stackoverflow.com/questions/1630169/how-to-create-nested-lua-tables-using-the-c-api luaL_dostring L print t.T.four 4 if res printf Error s n lua_tostring L 1 return 0 The program will simply print true . If you need.. res luaL_dostring L print t 0 0 4 if res printf Error s n lua_tostring L 1 return 0 Rather than using absolute indices of 0 like I..
Calling lua functions from .lua's using handles? http://stackoverflow.com/questions/3432231/calling-lua-functions-from-luas-using-handles cout ScriptEngine error loading script. Error returned was lua_tostring L 1 std endl To make it a bit more clear all I have in the..
Sending variable pointers back and forth between C++ and Lua? http://stackoverflow.com/questions/3481856/sending-variable-pointers-back-and-forth-between-c-and-lua L sizeof person pointer to person p new person lua_tostring L 1 associate with Person meta table lua_getglobal L Person..
Redirecting/redefining print() for embedded Lua http://stackoverflow.com/questions/4508119/redirecting-redefining-print-for-embedded-lua i 1 i nargs i if lua_isstring L i Pop the next arg using lua_tostring L i and do your print else Do something with non strings if..
Managing stack with Lua and C++ http://stackoverflow.com/questions/6511432/managing-stack-with-lua-and-c i lua_pushinteger L i lua_gettable L 1 const char s lua_tostring L 1 if s list_strings.push_back s lua_pop L 1 As it stands.. to do this but C std string s are . That's why I don't use lua_tostring the way you did C strings can store Lua strings exactly as they..
|