I can't figure out how to iterate through parameters. Usually I would use the
for i,blank in pairs(table) do print("One of the elements of this table is: ".. blank) end
But I don't know how to put the parameters in instead. I'm also open to other functions or any others ways to do it.
There's multiple ways you could go about this, but the easiest solution is to use ...
as your parameter instead. This will let you iterate through a table in the scope of the function.
An example
function printAll(...) local arg = {...} for i, blank in pairs(arg) do print("One of the elements of this table is: ".. blank) end end printAll(5, 9, 8) printAll("hello", nil, "world")