From 2ff60245a9e4f422aee3a3215e93ee6a758383ac Mon Sep 17 00:00:00 2001 From: sys4 Date: Mon, 20 Jul 2020 02:20:06 +0200 Subject: [PATCH] Fix warnings on undeclared global variables --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 7f3fa47..3f607d6 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,7 @@ local buildPlatform = function(node, pos, itemstack) -- code for the building platforms - posZ = {'1', '0', '-1', '-1', '0', '0', '1', '1' }; - posX = {'0', '-1', '0', '0', '1', '1', '0', '0' }; + local posZ = {'1', '0', '-1', '-1', '0', '0', '1', '1' }; + local posX = {'0', '-1', '0', '0', '1', '1', '0', '0' }; for nameCount = 1, 8 do pos.z = pos.z + posZ[nameCount]; @@ -20,8 +20,8 @@ local buildScaffolding = function(node, pos, itemstack, player) -- many thanks to addi for improveing (rewriteing) my crappy code -- -- code for the building scaffolding - height = 0; - depth = 0; -- !!Note!! depth is not needed at the moment + local height = 0; + local depth = 0; -- !!Note!! depth is not needed at the moment --[[ debug stuff ]] @@ -541,3 +541,5 @@ minetest.register_craft({ {'default:steel_ingot', '', ''}, } }) + +minetest.log("action", "[scaffolding] loaded.")