From 0bd9b83b835401e8b5822d1cc2d0c6d3bf9ad389 Mon Sep 17 00:00:00 2001 From: Evil Puncker Date: Thu, 25 Nov 2021 17:48:01 -0300 Subject: [PATCH] Update clay_lump.lua linter said it has nil value so It seems oke to declare the variable in the loop instead --- data/scripts/actions/others/clay_lump.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/scripts/actions/others/clay_lump.lua b/data/scripts/actions/others/clay_lump.lua index 29110f3650..d4f293c563 100644 --- a/data/scripts/actions/others/clay_lump.lua +++ b/data/scripts/actions/others/clay_lump.lua @@ -8,9 +8,9 @@ local config = { local clayLump = Action() function clayLump.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local random, tmpItem = math.random(0, 10000) * 0.01 + local random = math.random(0, 10000) * 0.01 for i = 1, #config do - tmpItem = config[i] + local tmpItem = config[i] if random >= tmpItem.chance[1] and random < tmpItem.chance[2] then item:getPosition():sendMagicEffect(CONST_ME_POFF)