Is there a way to not repeat
local arg = {} local arg2 = {} local arg3 = {} ... ...
?
local set = {}
local arg = {}
local arg2 = {}
local arg3 = {}
local num = 0
msg = msg:sub(#ms.StartCommand+1):lower()
for w in msg:gmatch("%S+") do
num = num + 1
for a in w:gmatch("([^,]+)") do
if num == 1 then
table.insert(arg,#arg+1,a)
elseif num == 2 then
table.insert(arg2,#arg2+1,a)
elseif num == 3 then
table.insert(arg3,#arg3+1,a)
end
end

1 comment
local Table = { {} }