[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Table madness :(
- From: "Kevin Baca" <lualist@...>
- Date: Tue, 23 Sep 2003 15:55:25 -0700
Re-posted:
> lua_getglobal(m_LuaVM, "myscript");
> if(lua_istable(m_LuaVM,-1)) {
> lua_pushstring(m_LuaVM,"debug");
> lua_gettable(m_LuaVM,-2);
> if(lua_isfunction(m_LuaVM,-1))
Add this:
lua_pushvalue( m_LuaVM, -3 ); //self
> lua_call(m_LuaVM, 0, 0);
Call like this:
lua_call(m_LuaVM, 1, 0);
> else
> lua_pop(m_LuaVM,1);
> }
>