I’ve come from C, so I’m not doing too badly picking up lua - but being able to return multiple values from functions is new as is the fact that the type of the variable is not specified. Example below
function nlst(u)
local t = {}
local p = url.parse(u)
p.command = “nlst”
p.sink = ltn12.sink.table(t)
local r, e = ftp.get§
return r and table.concat(t), e
end
In the above, what do I need to do when calling this function? Something like:
local mytable = nlst
What about the e? I’m assuming this is error? [import]uid: 31718 topic_id: 6503 reply_id: 306503[/import]