Good day, I would like to know how to convert table to ... and return it.
function GetArgsNormal(...)
return ...;
end
local a,b,c=GetArgsNormal(1,2,3); --this works
print("a b c:",a,b,c);
function GetArgsTable(t,...)
for i,v in pairs(t)do
({...})[i]=v;
end
return ...;
end
local d,e,f=GetArgsTable({1,2,3},nil); --result: d=nil, e=nil, f=nil
print("def:",d,e,f);
I tried all possible ways, which I had in my mind, but without success:(
Could anyone help me in this, please?
And yes, could you please answer instead of down-voting?!