Unlimited Arg's symbol?

I saw a function that had the arguments (…) and i checked the wiki and couldn’t find anything what does this mean and how is it used?

1 Like

That is used with a function that could possibly have more arguments.

function(…) could have 2 args, or 5 args. That’s up to you to configure.

local function hi(...)
local args = {...}
return args
end

for i,v in pairs(hi("hello","world")) do
print(v)
end

Output: helloworld

Here’s the relevant roblox wiki page Functions | Documentation - Roblox Creator Hub
and from the Lua wiki lua-users wiki: Vararg The Second Class Citizen
and from the book Programming in Lua : 5.2

4 Likes

This seems to be a big typo. Should be two dots. Can you confirm before I post a documentation correct?

1 Like

Yes the wiki is incorrect. The concatenation operator is supposed to be only two dots. Please do file the documentation request.

1 Like