- attempt to fix lua code that might be crashing the game

This commit is contained in:
Mark Vejvoda 2010-10-11 23:33:03 +00:00
parent 3a94f1506f
commit fd4054e345

View File

@ -95,14 +95,14 @@ void LuaScript::loadCode(const string &code, const string &name){
}
void LuaScript::beginCall(const string& functionName) {
//Lua_STREFLOP_Wrapper streflopWrapper;
Lua_STREFLOP_Wrapper streflopWrapper;
currentLuaFunction = functionName;
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] functionName [%s]\n",__FILE__,__FUNCTION__,__LINE__,functionName.c_str());
SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] functionName [%s]\n",__FILE__,__FUNCTION__,__LINE__,functionName.c_str());
lua_getglobal(luaState, functionName.c_str());
currentLuaFunctionIsValid = lua_isfunction(luaState,lua_gettop(luaState));
currentLuaFunctionIsValid = (lua_isfunction(luaState,lua_gettop(luaState)) == 1);
argumentCount= 0;
}