From 4cc001d2f075ca46591aec23ab613993d6b9aa90 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Fri, 19 Jan 2024 18:10:05 +0000 Subject: [PATCH] fix typo in stashhasitem --- crafting.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crafting.lua b/crafting.lua index f468246..c4cfa6c 100644 --- a/crafting.lua +++ b/crafting.lua @@ -403,12 +403,11 @@ RegisterNetEvent(GetCurrentResourceName()..":server:stashRemoveItem", stashRemov function stashhasItem(stashItems, items, amount) local foundInv = "" if type(items) ~= "table" then items = { [items] = amount and amount or 1, } end - local hasTable = {} for item, amount in pairs(items) do local count = 0 for _, itemData in pairs(stashItems) do - if itemData and (itemData.name == k) then + if itemData and (itemData.name == item) then count += (itemData.amount or 1) end end