¡@

Home 

c++ Programming Glossary: lual_loadfile

Calling lua functions from .lua's using handles?

http://stackoverflow.com/questions/3432231/calling-lua-functions-from-luas-using-handles

filename it std string filepath scriptdir filename if luaL_loadfile L filepath.c_str lua_pcall L 0 0 0 std cout ScriptEngine error.. L const char filename load the lua script into memory luaL_loadfile L filename create a new function environment and store it in.. for brevity but you'll want to check the return value of luaL_loadfile and use lua_pcall instead of lua_call . share improve this..

Managing stack with Lua and C++

http://stackoverflow.com/questions/6511432/managing-stack-with-lua-and-c

the stack before I load and call the source file if error luaL_loadfile L src test.lua 0 lua_pushstring L path.c_str if error lua_pcall.. now 1 Looking at the state of the stack before the call... luaL_loadfile pushes a function to the stack Or does lua_pcall Assuming you.. the Lua state besides create it then stack is empty before luaL_loadfile. And yes luaL_loadfile pushes a function onto the stack. This..

Compile lua code, store bytecode then load and execute it

http://stackoverflow.com/questions/8936369/compile-lua-code-store-bytecode-then-load-and-execute-it

you're doing is compiling the script file. You could use luaL_loadfile which uses C standard library functions to read a file from.. string or byte code. So yes you can load byte code with luaL_loadfile just like before. The difference is that you can't use luaL_loadstring..