mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-09-16 09:16:22 +02:00
ipairs -> pairs
This commit is contained in:
@@ -85,7 +85,7 @@ function Command.add(command_name, options, callback)
|
|||||||
error(format("The command '%s' is not allowed by the server nor player, please enable at least one of them.", command_name))
|
error(format("The command '%s' is not allowed by the server nor player, please enable at least one of them.", command_name))
|
||||||
end
|
end
|
||||||
|
|
||||||
for index, argument_name in ipairs(arguments) do
|
for index, argument_name in pairs(arguments) do
|
||||||
local argument_display = argument_name
|
local argument_display = argument_name
|
||||||
for default_value_name, _ in pairs(default_values) do
|
for default_value_name, _ in pairs(default_values) do
|
||||||
if default_value_name == argument_name then
|
if default_value_name == argument_name then
|
||||||
@@ -152,7 +152,7 @@ function Command.add(command_name, options, callback)
|
|||||||
|
|
||||||
local errors = {}
|
local errors = {}
|
||||||
|
|
||||||
for index, argument in ipairs(arguments) do
|
for index, argument in pairs(arguments) do
|
||||||
local parameter = from_command[index]
|
local parameter = from_command[index]
|
||||||
|
|
||||||
if not parameter then
|
if not parameter then
|
||||||
@@ -173,7 +173,7 @@ function Command.add(command_name, options, callback)
|
|||||||
|
|
||||||
local return_early = false
|
local return_early = false
|
||||||
|
|
||||||
for _, error in ipairs(errors) do
|
for _, error in pairs(errors) do
|
||||||
return_early = true
|
return_early = true
|
||||||
print(error)
|
print(error)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user