summaryrefslogtreecommitdiff
path: root/worldedit_commands/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'worldedit_commands/init.lua')
-rw-r--r--worldedit_commands/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua
index 131c49b..763e895 100644
--- a/worldedit_commands/init.lua
+++ b/worldedit_commands/init.lua
@@ -905,9 +905,12 @@ minetest.register_chatcommand("/stretch", {
stretchx, stretchy, stretchz = tonumber(stretchx), tonumber(stretchy), tonumber(stretchz)
if stretchx == 0 or stretchy == 0 or stretchz == 0 then
worldedit.player_notify(name, "invalid scaling factors: " .. param)
+ return nil
end
local count = check_region(name, param)
- if count then return tonumber(stretchx) * tonumber(stretchy) * tonumber(stretchz) * count end
+ if count then
+ return stretchx * stretchy * stretchz * count
+ end
return nil
end),
})