From 08fb90348d75e9b14f3dac1565ee61d8617b1aec Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 3 Feb 2016 20:45:53 +0000 Subject: [PATCH] Fix spawner crash (thanks crabman77) --- spawner.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spawner.lua b/spawner.lua index a92bf5b..e07216a 100644 --- a/spawner.lua +++ b/spawner.lua @@ -50,11 +50,11 @@ minetest.register_node("mobs:spawner", { local num = tonumber(comm[4]) -- total mobs in area local pla = tonumber(comm[5])-- player distance (0 to disable) - if mob and mob ~= "" + if mob and mob ~= "" and mobs.spawning_mobs[mob] == true and num and num >= 0 and num <= 10 and mlig and mlig >= 0 and mlig <= 15 and xlig and xlig >= 0 and xlig <= 15 - and pla >=0 and pla <= 20 then + and pla and pla >=0 and pla <= 20 then meta:set_string("command", fields.text) meta:set_string("infotext", "Spawner Active (" .. mob .. ")")