From 2594084de6e163f15a1516d64cf413de5b0d899f Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 8 Jan 2013 18:03:02 +0100 Subject: Added support for Lua 5.2 Should still work against Lua 5.1 as well. --- src/scripting/luascript.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/scripting/luascript.cpp') diff --git a/src/scripting/luascript.cpp b/src/scripting/luascript.cpp index 97b03e1..a3dcb1d 100644 --- a/src/scripting/luascript.cpp +++ b/src/scripting/luascript.cpp @@ -151,7 +151,11 @@ bool LuaScript::resume() setMap(mCurrentThread->mMap); const int tmpNbArgs = nbArgs; nbArgs = -1; +#if LUA_VERSION_NUM < 502 int result = lua_resume(mCurrentState, tmpNbArgs); +#else + int result = lua_resume(mCurrentState, NULL, tmpNbArgs); +#endif setMap(0); if (result == 0) // Thread is done -- cgit