- attempt to fix lua code that might be crashing the game
This commit is contained in:
parent
3a94f1506f
commit
fd4054e345
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user