equal
deleted
inserted
replaced
1671 var ret : LongInt; |
1671 var ret : LongInt; |
1672 s : shortstring; |
1672 s : shortstring; |
1673 begin |
1673 begin |
1674 s:= UserPathz[ptData] + '/' + name; |
1674 s:= UserPathz[ptData] + '/' + name; |
1675 if not FileExists(s) then s:= Pathz[ptData] + '/' + name; |
1675 if not FileExists(s) then s:= Pathz[ptData] + '/' + name; |
|
1676 if not FileExists(s) then exit; |
|
1677 |
1676 ret:= luaL_loadfile(luaState, Str2PChar(s)); |
1678 ret:= luaL_loadfile(luaState, Str2PChar(s)); |
1677 if ret <> 0 then |
1679 if ret <> 0 then |
1678 begin |
1680 begin |
1679 LuaError('Lua: Failed to load ' + name + '(error ' + IntToStr(ret) + ')'); |
1681 LuaError('Lua: Failed to load ' + name + '(error ' + IntToStr(ret) + ')'); |
1680 LuaError('Lua: ' + lua_tostring(luaState, -1)); |
1682 LuaError('Lua: ' + lua_tostring(luaState, -1)); |