From 0724796e51ed655b37c4a80f60c66087c7d16efc Mon Sep 17 00:00:00 2001 From: cheapie Date: Sun, 5 Feb 2017 19:28:57 -0600 Subject: Make sure the message is a string before trying to lowercase it --- infrastructure/advanced_lane_control_lights.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'infrastructure') diff --git a/infrastructure/advanced_lane_control_lights.lua b/infrastructure/advanced_lane_control_lights.lua index 195f809..94d7ce1 100644 --- a/infrastructure/advanced_lane_control_lights.lua +++ b/infrastructure/advanced_lane_control_lights.lua @@ -63,10 +63,10 @@ for i = 1, 6 do effector = { action = function(pos, node, channel, msg) local setchan = minetest.get_meta(pos):get_string("channel") - if setchan ~= channel then + if setchan ~= channel or type(msg) ~= "string" then return end - msg = msg:lower() + msg = string.lower(msg) if (msg=="off") then node.name = "infrastructure:lane_control_lights_1" elseif (msg=="green") then -- cgit v1.2.3