mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 00:53:00 +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
|
if #parts >= 1 then
|
||||||
interval = tonumber(parts[1])
|
interval = tonumber(parts[1])
|
||||||
if not interval then
|
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
|
end
|
||||||
table.remove(parts, 1)
|
table.remove(parts, 1)
|
||||||
end
|
end
|
||||||
if #parts >= 1 then
|
if #parts >= 1 then
|
||||||
acceleration = tonumber(parts[1])
|
acceleration = tonumber(parts[1])
|
||||||
if not acceleration then
|
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
|
end
|
||||||
table.remove(parts, 1)
|
table.remove(parts, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local target_node_norm = worldedit.normalize_nodename(target_node)
|
local target_node_norm = worldedit.normalize_nodename(target_node)
|
||||||
if not target_node_norm then
|
if not target_node_norm then
|
||||||
return false, "Error: Unknown node '"..target_node_norm.."'."
|
return false, "Error: Unknown node '"..tostring(target_node).."'."
|
||||||
end
|
end
|
||||||
|
|
||||||
return true, mode, target_node_norm, interval, acceleration
|
return true, mode, target_node_norm, interval, acceleration
|
||||||
|
|
Loading…
Reference in a new issue