thx for reading
-Freack100-
Posted 24 April 2013 - 02:09 AM
Posted 24 April 2013 - 02:14 AM
function someName( ... )
local params = { ... }
for _,v in ipairs(params) do
print(v)
end
end
someName( 'hello' )
someName( 'hello', ' ', 'world', '!' )
local params = ...you would only get the first one, hence putting it in a table
local p, a = ...and it will get the first 2
function someName( something, ... )and the first value passed in will go into something the rest goes into the ...
function someName( ..., something )
Edited by theoriginalbit, 24 April 2013 - 02:17 AM.
Posted 24 April 2013 - 02:18 AM
theoriginalbit, on 24 April 2013 - 02:14 AM, said:
function someName( ... )
local params = { ... }
for _,v in ipairs(params) do
print(v)
end
end
someName( 'hello' )
someName( 'hello', ' ', 'world', '!' )
local params = ...you would only get the first one, hence putting it in a table
local p, a = ...and it will get the first 2
function someName( something, ... )and the first value passed in will go into something the rest goes into the ...
function someName( ..., something )
0 members, 1 guests, 0 anonymous users