summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-11-18 12:57:46 +0100
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2017-11-18 12:57:46 +0100
commit38fbca8eafcba9136c7c231a1feeccf7b172eb92 (patch)
tree288cc17349110e079bd06fdc41ba6a3730cc4148
parentefc7223e2d179bfcd808ce629bc6eae8e22afc23 (diff)
downloadsmartshop-38fbca8eafcba9136c7c231a1feeccf7b172eb92.tar.gz
smartshop-38fbca8eafcba9136c7c231a1feeccf7b172eb92.tar.bz2
smartshop-38fbca8eafcba9136c7c231a1feeccf7b172eb92.zip
solved bug with alerting
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
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