Call GetGlobals after entering Lua command with /lua
authorWuzzy <Wuzzy2@mail.ru>
Mon, 03 Sep 2018 00:48:51 +0200
changeset 13747 be265ab8a4fb
parent 13746 4b79bac864be
child 13748 1a26c472f5ef
Call GetGlobals after entering Lua command with /lua
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Mon Sep 03 00:15:55 2018 +0200
+++ b/hedgewars/uScript.pas	Mon Sep 03 00:48:51 2018 +0200
@@ -114,6 +114,7 @@
 var LuaDebugInfo: lua_Debug;
 
 procedure SetGlobals; forward;
+procedure GetGlobals; forward;
 procedure LuaParseString(s: shortString);
 begin
     SetGlobals;
@@ -123,7 +124,9 @@
         begin
         AddFileLog('[Lua] input string parsing error!');
         AddChatString(#5 + '[Lua] Error while parsing!');
-        end;
+        end
+    else
+        GetGlobals();
 end;
 
 function LuaUpdateDebugInfo(): Boolean;