From b7f0f34a41b1b0ca4b82fff6f45abc7d13b0df5a 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 c372783..9cc0066 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