set globals in commandline lua
authornemo
Wed, 03 Dec 2014 11:32:18 -0500
changeset 10617 457730f03c47
parent 10615 e3dcb235a354
child 10618 7b72cf27cd04
set globals in commandline lua
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Wed Dec 03 17:09:04 2014 +0100
+++ b/hedgewars/uScript.pas	Wed Dec 03 11:32:18 2014 -0500
@@ -109,8 +109,10 @@
 
 var LuaDebugInfo: lua_Debug;
 
+procedure SetGlobals; forward;
 procedure LuaParseString(s: shortString);
 begin
+    SetGlobals;
     AddFileLog('[Lua] input string: ' + s);
     AddChatString(#3 + '[Lua] > ' + s);
     if luaL_dostring(luaState, Str2PChar(s)) <> 0 then