public ThreadStatus L_DoFile(string filename) { #if LUAPACK if ((LuaAPI.luaL_loadpak(this.m_lua, filename) == 0) && (LuaAPI.lua_pcall(this.m_lua, 0, -1, 0) == 0)) { return(ThreadStatus.LUA_OK); } #else if ((LuaAPI.luaL_loadfile(this.luaPtr, filename) == 0) && (LuaAPI.lua_pcall(this.luaPtr, 0, -1, 0) == 0)) { return(ThreadStatus.LUA_OK); } #endif DebugLogger.LogError("DoFile Error: " + filename + "\nlua stack: " + LuaInstance.ConstructString(LuaInstance.Instance.Get())); return(ThreadStatus.LUA_ERRRUN); }