From ec68d6cbd79c91d6341b6c688c480b15cd9e606b Mon Sep 17 00:00:00 2001 From: TalkLounge Date: Sat, 15 Jun 2019 17:04:06 +0200 Subject: [PATCH] Update init.lua --- worldedit_commands/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 61aafc1..b3d17f9 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -1165,7 +1165,11 @@ minetest.register_chatcommand("/allocate", { worldedit.player_notify(name, "File was created with newer version of WorldEdit!") end local nodepos1, nodepos2, count = worldedit.allocate(pos, value) - + if not nodepos1 or not nodepos2 or not count then + worldedit.player_notify(name, "0 nodes allocated") + return + end + worldedit.pos1[name] = nodepos1 worldedit.mark_pos1(name) worldedit.pos2[name] = nodepos2