-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dot dot dot usage in loadstring/file #89
Comments
loadstring is not an official function any more. To get this to work, I need to change a lot of stuff down to the parser. But it is possible to create this default argument (for load). Btw: |
I'm happy to do work for this, if you can provide more information. My requirement is to read from a file - |
The compile funktion has no arguments, the null needs to get an array of objects. |
The offset point for all changes is in LuaGlobal.cs:333. The third parameter of |
I'll do what I can. The reproduction I gave is an example of many generated files in the project I'm working on. The files in question look like: local data = ...
data.points = { } -- with lots of data There are also cases like this: local skills, mod, flag, skill = ...
skills["Blah"] = { } -- with lots of data These files are loaded using the function: function LoadModule(fileName, ...)
if not fileName:match("%.lua") then
fileName = fileName .. ".lua"
end
local func, err = loadfile(fileName)
if func then
return func(...)
else
error("LoadModule() error loading '"..fileName.."': "..err)
end
end The Lua docs are somewhat vague on this and state: |
It is vague indeed, and this is not the only thing. I changed it, know that your code should run? local fn = load('local a, b = ...; return a, b;');
return fn(23,42); |
From a quick check this does appear to help - thank you. I'll test further tomorrow. |
I can't find in the Lua docs if this usage of
...
insideloadstring
orloadfile
is valid or standardised, but I do see it working on LuaJit.NeoLua Version: Latest commit (a0fdcc6)
Example to reproduce:
Expected behaviour (from LuaJit):
The text was updated successfully, but these errors were encountered: