Skip to content

Instantly share code, notes, and snippets.

@take-cheeze
Created February 22, 2013 05:34
Show Gist options
  • Select an option

  • Save take-cheeze/5010976 to your computer and use it in GitHub Desktop.

Select an option

Save take-cheeze/5010976 to your computer and use it in GitHub Desktop.
lua version fix
diff --git a/src/platform/lua_bot.cpp b/src/platform/lua_bot.cpp
index a927e9d..72275c8 100644
--- a/src/platform/lua_bot.cpp
+++ b/src/platform/lua_bot.cpp
@@ -96,7 +96,11 @@ void LuaBot::resume() {
assert(L);
assert(lua_type(L, -1) == LUA_TTHREAD);
+#if LUA_VERSION_NUM >= 502
+ switch(lua_resume(executer_, L, 0)) {
+#else
switch(lua_resume(executer_, 0)) {
+#endif
case 0: // LUA_OK
Output::Debug("Script ended. Quiting");
finish();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment