mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-12 03:13:00 +00:00
Prefix all loaded strings with "="
Whilst this is not consistent with normal Lua, this is required in order to remain compatible with LuaJ.
This commit is contained in:
@@ -541,7 +541,7 @@ loadfile = function( _sFile, _tEnv )
|
||||
end
|
||||
local file = fs.open( _sFile, "r" )
|
||||
if file then
|
||||
local func, err = load( file.readAll(), fs.getName( _sFile ), "t", _tEnv )
|
||||
local func, err = load( file.readAll(), "@" .. fs.getName( _sFile ), "t", _tEnv )
|
||||
file.close()
|
||||
return func, err
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user