summaryrefslogtreecommitdiffstats
path: root/src/scripting/luascript.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-01-08 18:03:02 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-01-09 01:13:43 +0100
commit2594084de6e163f15a1516d64cf413de5b0d899f (patch)
treee1843432693884c40df876aa6ddc26ee5e6e78a5 /src/scripting/luascript.cpp
parentf8cabbd458ed3658ca0e933bd52e29d857f594e2 (diff)
downloadmanaserv-2594084de6e163f15a1516d64cf413de5b0d899f.tar.gz
manaserv-2594084de6e163f15a1516d64cf413de5b0d899f.tar.xz
manaserv-2594084de6e163f15a1516d64cf413de5b0d899f.zip
Added support for Lua 5.2
Should still work against Lua 5.1 as well.
Diffstat (limited to 'src/scripting/luascript.cpp')
-rw-r--r--src/scripting/luascript.cpp4
1 files changed, 4 insertions, 0 deletions
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