mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-30 13:13:00 +00:00
Fixed error handling in scale subcommand (#816)
This commit is contained in:
@@ -7,7 +7,7 @@ local function printUsage()
|
||||
end
|
||||
|
||||
local tArgs = { ... }
|
||||
if #tArgs < 2 then
|
||||
if #tArgs < 2 or tArgs[1] == "scale" and #tArgs < 3 then
|
||||
printUsage()
|
||||
return
|
||||
end
|
||||
@@ -21,7 +21,7 @@ if tArgs[1] == "scale" then
|
||||
|
||||
local nRes = tonumber(tArgs[3])
|
||||
if nRes == nil or nRes < 0.5 or nRes > 5 then
|
||||
print("Invalid scale: " .. nRes)
|
||||
print("Invalid scale: " .. tArgs[3])
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user