Hey guys, just a problem that I’ve come across which I can’t seem to find a direct answer to on the google.
So if I declare a var in a local scope, I use the local keyword:
function foo()
local x = 1;
end
which makes it inaccessible to an outer scope. And if, in the assignment of the variable, I call a function, I would do this:
function foo()
local x = foo2();
end
which works the same. Now, my question is, if foo2() has multiple returns, and I do:
function foo()
local x, y = foo2();
end
will both x and y have the local keyword applied? or would I have to do:
function foo()
local x;
local y;
x, y = foo2();
end
any help appreciated [import]uid: 68278 topic_id: 13061 reply_id: 313061[/import]