hedgewars/uScript.pas
changeset 13747 be265ab8a4fb
parent 13745 d7b72ea8d136
child 13752 110d6c1e817f
--- 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;