From 93942db2c14dd312f30f8364f94e1ba20f69b70b Mon Sep 17 00:00:00 2001 From: paly2 Date: Sun, 19 Jun 2016 16:39:25 +0200 Subject: [PATCH] Fix a bug of the move_area chatcommand --- chatcommands.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chatcommands.lua b/chatcommands.lua index d37634a..7bdc53c 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -296,8 +296,7 @@ minetest.register_chatcommand("move_area", { return false, "Invalid usage, see /help move_area." end - local area = areas.areas[id] - if not area then + if not areas.areas[id] then return false, "Area does not exist." end @@ -306,8 +305,8 @@ minetest.register_chatcommand("move_area", { return false, "You need to select an area first." end - area.pos1 = pos1 - area.pos2 = pos2 + areas.areas[id].pos1 = pos1 + areas.areas[id].pos2 = pos2 areas:save() return true, "Area successfully moved." end,