diff --git a/source/shared_lib/sources/lua/lua_script.cpp b/source/shared_lib/sources/lua/lua_script.cpp index ccb5f7fd7..2f1f158e2 100644 --- a/source/shared_lib/sources/lua/lua_script.cpp +++ b/source/shared_lib/sources/lua/lua_script.cpp @@ -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; }