summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Euchner <norrepli@gmail.com>2016-01-19 17:09:40 +0100
committerFlorian Euchner <norrepli@gmail.com>2016-01-19 17:09:40 +0100
commit60c3e608a9e0927e61f699d1f538ff4711a7b833 (patch)
tree51856ebc90f5cb9317df17e3277f2b772b365fb6
parent69e1d1ba9b2437790fbeb9f250086ed4a0cdebbb (diff)
parentdcb25cbe2f74b6d538d2569db2341e0c1ce1ef32 (diff)
Merge pull request #28 from electrodude/bugs
Add missing local variable
-rw-r--r--digilines_inventory/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/digilines_inventory/init.lua b/digilines_inventory/init.lua
index 89aaabc..a8e7ecf 100644
--- a/digilines_inventory/init.lua
+++ b/digilines_inventory/init.lua
@@ -127,7 +127,9 @@ minetest.register_node("digilines_inventory:chest", {
minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
- local inv = minetest.get_meta(pos):get_inventory()
+ local meta = minetest.get_meta(pos)
+ local channel = meta:get_string("channel")
+ local inv = meta:get_inventory()
if inv:is_empty(listname) then
sendMessage(pos, "empty", channel)
end