Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
`arg` instad of `arguments`
  • Loading branch information
lL1l1 committed Dec 9, 2024
1 parent 8e2b159 commit 89e8e7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lua/ui/lobby/autolobby/components/AutolobbyArguments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ AutolobbyArgumentsComponent = ClassSimple {

-- try to get the first argument
local arguments = GetCommandLineArg(option, 1)
if arguments and (not option[ arg[1] ]) then
return arg[1]
if arguments and (not option[ arguments[1] ]) then
return arguments[1]
end

return default
Expand All @@ -100,12 +100,12 @@ AutolobbyArgumentsComponent = ClassSimple {

-- try to get the first argument and parse it as a number
local arguments = GetCommandLineArg(option, 1)
if arguments and (not option[ arg[1] ]) then
local parsed = tonumber(arg[1])
if arguments and (not option[ arguments[1] ]) then
local parsed = tonumber(arguments[1])
if parsed then
return parsed
else
self:DebugWarn("Failed to parse as a number: ", arg[1], " for key ", option)
self:DebugWarn("Failed to parse as a number: ", arguments[1], " for key ", option)
return default
end
end
Expand Down

0 comments on commit 89e8e7f

Please sign in to comment.