From 38fbca8eafcba9136c7c231a1feeccf7b172eb92 Mon Sep 17 00:00:00 2001 From: Gabriel PĂ©rez-Cerezo Date: Sat, 18 Nov 2017 12:57:46 +0100 Subject: solved bug with alerting --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 9f518e8..2852e6c 100644 --- a/init.lua +++ b/init.lua @@ -123,7 +123,7 @@ smartshop.receive_fields=function(player,pressed) if type==1 then inv:remove_item("main", stack) inv:add_item("main", pay) - if not inv:contains_item("main", stack) and not meta:get_int("alerted") or meta:get_int("alerted") == 0 then + if not inv:contains_item("main", stack) and (not meta:get_int("alerted") or meta:get_int("alerted") == 0) then meta:set_int("alerted",1) -- Do not alert twice smartshop.send_mail(meta:get_string("owner"), pos, stack) end -- cgit v1.2.3