From b586e2c27a43b93045a1d65b9f7e23c0b71f8b15 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 6 May 2015 11:36:27 +0100 Subject: [PATCH] fixed local variable error --- api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index a076879..1962020 100644 --- a/api.lua +++ b/api.lua @@ -1,4 +1,4 @@ --- Mobs Api (4th May 2015) +-- Mobs Api (6th May 2015) mobs = {} mobs.mod = "redo" @@ -374,7 +374,7 @@ function mobs:register_mob(name, def) if self.type == "npc" and self.attacks_monsters and self.state ~= "attack" then s = self.object:getpos() - obj = nil + local obj = nil for _, oir in pairs(minetest.get_objects_inside_radius(s,self.view_range)) do obj = oir:get_luaentity() if obj and obj.type == "monster" then