From 6b8a1b7f82f6e22eb2fc9f5ba81552ba65d22098 Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Mon, 29 May 2017 02:54:14 -0700 Subject: [PATCH] Fix finding number of active entities in world --- spawn.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spawn.lua b/spawn.lua index 5c849c9..b545709 100644 --- a/spawn.lua +++ b/spawn.lua @@ -47,9 +47,9 @@ minetest.register_abm({ end -- Get total count of sneekers in world - local name, count - for name in pairs(minetest.luaentities) do - if name == sneeker.mob_name then + local count = 0 + for I in pairs(minetest.luaentities) do + if minetest.luaentities[I].name == sneeker.mob_name then count = count + 1 end end