mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Realy is fixed this time
This commit is contained in:
@@ -30,8 +30,14 @@ function command_inputs_to_string(command)
|
|||||||
end
|
end
|
||||||
--Can be used to ensure the right number of inputs are given
|
--Can be used to ensure the right number of inputs are given
|
||||||
function get_command_args(event,command,allow_invaild)
|
function get_command_args(event,command,allow_invaild)
|
||||||
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 = {}
|
local args = {}
|
||||||
|
if not event.parameter then
|
||||||
|
if #command.inputs > 0 then
|
||||||
|
if allow_invaild then return args end
|
||||||
|
return 'Invalid'
|
||||||
|
end
|
||||||
|
return args
|
||||||
|
end
|
||||||
for word in event.parameter:gmatch('%S+') do table.insert(args,word) end
|
for word in event.parameter:gmatch('%S+') do table.insert(args,word) end
|
||||||
if allow_invaild then return args end
|
if allow_invaild then return args end
|
||||||
if command.inputs[#command.inputs] == true then
|
if command.inputs[#command.inputs] == true then
|
||||||
|
|||||||
Reference in New Issue
Block a user