From 380b7af63d1a72833ac551acfe626055b992bbb6 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 2 Sep 2016 07:40:18 +0200 Subject: [PATCH] Use more locals --- easyvend.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easyvend.lua b/easyvend.lua index 518054a..b9385ea 100644 --- a/easyvend.lua +++ b/easyvend.lua @@ -371,6 +371,7 @@ easyvend.on_receive_fields_customer = function(pos, formname, fields, sender) end minetest.chat_send_player(sendername, msg) else + local msg if not chest_has and not player_has then msg = "You can't afford this item, and the vending machine has insufficient materials!" easyvend.machine_disable(pos, node, sendername) @@ -470,6 +471,7 @@ easyvend.on_receive_fields_customer = function(pos, formname, fields, sender) end minetest.chat_send_player(sendername, msg) else + local msg if not chest_has and not player_has then msg = "You have insufficient materials, and the depositing machine can't afford to pay you!" easyvend.machine_disable(pos, node, sendername)