From 2897fe334f478d9c80c70bb558fd83b5904e56d4 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 20 Dec 2014 20:08:45 +0000 Subject: [PATCH] Assignment to undeclared global --- food/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/food/init.lua b/food/init.lua index 19d019f..0cfc4e8 100644 --- a/food/init.lua +++ b/food/init.lua @@ -41,7 +41,7 @@ function food.support(group, item) if idx <= 1 then error("[Food Error] food.support - error in item name ('" .. item .. "')") end - mod = string.sub(item, 1, idx - 1) + local mod = string.sub(item, 1, idx - 1) if not minetest.get_modpath(mod) then if food.debug then @@ -60,7 +60,7 @@ function food.support(group, item) food.disable(group) -- Add group - g = {} + local g = {} if data.groups then for k, v in pairs(data.groups) do g[k] = v