From 65137207ae623435a30d02744db1a369ad947b03 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Wed, 14 May 2025 23:38:34 +0100 Subject: [PATCH] add fallback for hasItem if no inventory is found --- shared/inventories.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/inventories.lua b/shared/inventories.lua index a8b038b..d5aac0b 100644 --- a/shared/inventories.lua +++ b/shared/inventories.lua @@ -67,6 +67,9 @@ function hasItem(items, amount, src) end return true, hasTable end + -- if can't find inventory, return false + print("^1Error^7: ^1Can't find players inventory for some reason") + return false, {} end --- Retrieves a player's inventory based on the active inventory system.