This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
DannySMc's profile picture

Get arguments back in a table

Started by DannySMc, 01 July 2014 - 11:20 PM
DannySMc #1
Posted 02 July 2014 - 01:20 AM
Okay so I am trying to make a quicker way to get the arguments back into a table like instead of:

local event, arg1, arg2, arg3, arg4, arg5 = os.pullEvent()
do it so it comes out in a table like (this doesn't work…):

local args {...} = os.pullEvent()
So I can do the following:

for_, strArgs in ipairs(args) do
   print(strArgs)
end
Dog #2
Posted 02 July 2014 - 01:21 AM
try this

local args = { os.pullEvent() }
Edited on 01 July 2014 - 11:21 PM