mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-22 19:45:02 +00:00
//spiral2: fix crash in parser
This commit is contained in:
parent
33a2ff1ed4
commit
ea8a91568e
1 changed files with 3 additions and 3 deletions
|
@ -36,21 +36,21 @@ worldedit.register_command("spiral2", {
|
|||
if #parts >= 1 then
|
||||
interval = tonumber(parts[1])
|
||||
if not interval then
|
||||
return false, "Error: Invalid interval value '"..parts[1].."'. Interval values must be integers."
|
||||
return false, "Error: Invalid interval value '"..tostring(parts[1]).."'. Interval values must be integers."
|
||||
end
|
||||
table.remove(parts, 1)
|
||||
end
|
||||
if #parts >= 1 then
|
||||
acceleration = tonumber(parts[1])
|
||||
if not acceleration then
|
||||
return false, "Error: Invalid acceleration value '"..parts[1].."'. Acceleration values must be integers."
|
||||
return false, "Error: Invalid acceleration value '"..tostring(parts[1]).."'. Acceleration values must be integers."
|
||||
end
|
||||
table.remove(parts, 1)
|
||||
end
|
||||
|
||||
local target_node_norm = worldedit.normalize_nodename(target_node)
|
||||
if not target_node_norm then
|
||||
return false, "Error: Unknown node '"..target_node_norm.."'."
|
||||
return false, "Error: Unknown node '"..tostring(target_node).."'."
|
||||
end
|
||||
|
||||
return true, mode, target_node_norm, interval, acceleration
|
||||
|
|
Loading…
Reference in a new issue