Now returns nil as a table

This commit is contained in:
Cooldude2606
2017-09-05 18:26:06 +01:00
parent 95900866af
commit 6230f2cb7a

View File

@@ -30,7 +30,7 @@ function command_inputs_to_string(command)
end
--Can be used to ensure the right number of inputs are given
function get_command_args(event,command,allow_invaild)
if not event.parameter then if #command.inputs > 0 then if allow_invaild then return end return 'Invalid' else return end end
if not event.parameter then if #command.inputs > 0 then if allow_invaild then return {nil} end return 'Invalid' else return end end
local args = {}
for word in event.parameter:gmatch('%S+') do table.insert(args,word) end
if allow_invaild then return args end