Changeset 6629 for code/branches/gamestate/src/libraries/core/LuaState.cc
- Timestamp:
- Mar 28, 2010, 10:46:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/src/libraries/core/LuaState.cc
r6627 r6629 170 170 origin = " originating from " + sourceFileInfo_->filename; 171 171 COUT(1) << "Error in Lua-script" << origin << ": " << lua_tostring(luaState_, -1) << std::endl; 172 // return value is nil 173 lua_pushnil(luaState_); 174 } 175 // push return value because it will get lost since the return value of this function is void 172 // return value is true (not nil!) 173 lua_pushboolean(luaState_, 1); 174 } 175 if (lua_isnil(luaState_, -1)) 176 { 177 // Nil return values cause problems 178 lua_pop(luaState_, 1); 179 lua_pushboolean(luaState_, 1); 180 } 181 // Push return value because it will get lost since the return value of this function is void 176 182 lua_setglobal(luaState_, "LuaStateReturnValue"); 177 183
Note: See TracChangeset
for help on using the changeset viewer.