hedgewars/uScript.pas
changeset 11532 bf86c6cb9341
parent 11520 663ecfb05df6
child 11561 254333210cc8
--- a/hedgewars/uScript.pas	Sun Jan 24 00:02:57 2016 +0100
+++ b/hedgewars/uScript.pas	Sun Jan 31 16:07:14 2016 +0300
@@ -442,7 +442,6 @@
 
 // enable/disable cinematic effects
 function lc_setcinematicmode(L : Plua_State) : LongInt; Cdecl;
-var at: LongInt;
 const
     call = 'SetCinematicMode';
     params = 'enable';
@@ -3111,7 +3110,7 @@
 begin
 // initialize lua
 luaState:= lua_open;
-TryDo(luaState <> nil, 'lua_open failed', true);
+if checkFails(luaState <> nil, 'lua_open failed', true) then exit;
 
 // open internal libraries
 luaopen_base(luaState);