lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


In my game engine, I'm loading lua scripts using luaL_loadfile, then, to 
execute, I run lua_pcall.  If I execute the script again with lua_pcall, 
it fails unless I call luaL_loadfile again before lua_pcall...

I'm trying to avoid recompiling everytime I run a script, I'd like to run 
pure bytecode each time.

So, what I'm trying to use is lua_ref and lua_pushref, but lua_pushref 
isn't defined in my copy of the 5.0 code from lua.org.  I'm not even sure 
this will work, but it looked promising.


Any ideas how to call lua scripts from C/C++ without recompiling each 
time?

-- 
*--*---*---*----*-----*------*------*-----*----*---*---*--*
Kevin Meinert                         /_/                  
home - http://www.vrsource.org/~kevin           \        / 
music - http://www.subatomicglue.com           \/  __    \/
                                                   \__     
                                            \_\