lua-users home
lua-l archive

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



You need to call the function left on the stack by lua_load.

Ando Sonenblick wrote:
    result = lua_load(itsLuaState, LuaEngineChunkReader, this,"")

               || lua_pcall(L, 0, 0, 0);  /* ADD THIS HERE !!! */

    if (result == kNoError)
        {
        lua_pushstring(itsLuaState, "main");
        lua_gettable(itsLuaState, LUA_GLOBALSINDEX);
        if (lua_isnil(itsLuaState, -1) == false)
            lua_call(itsLuaState, 0, 0);
        }