FIX: Load Lua library

This commit is contained in:
Alexander Koblov 2016-11-06 11:01:28 +00:00
commit 4b97f2d671

View file

@ -35,7 +35,7 @@ function ExecuteScript(const FileName: String; Args: array of String): Boolean;
implementation
uses
Forms, Dialogs, LazUTF8, DCOSUtils, fMain, uFormCommands, uOSUtils;
Forms, Dialogs, LazUTF8, DCOSUtils, fMain, uFormCommands, uOSUtils, uGlobs;
function luaFileGetAttr(L : Plua_State) : Integer; cdecl;
begin
@ -110,6 +110,12 @@ var
begin
Result:= False;
// Load Lua library
if not IsLuaLibLoaded then
begin
if not LoadLuaLib(gLuaLib) then Exit;
end;
// Get script file name
Script:= mbFileNameToSysEnc(FileName);