From 93c1606fbd7c5714925b3b0afb50e1f896b39354 Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Sun, 2 Jun 2024 12:41:21 +0200 Subject: [PATCH] fix: accessing undefined variable name + owner + items --- .../server/classes/addoninventory.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server-data/resources/[bpt_addons]/bpt_addoninventory/server/classes/addoninventory.lua b/server-data/resources/[bpt_addons]/bpt_addoninventory/server/classes/addoninventory.lua index 939b63072..09fb2ebe8 100644 --- a/server-data/resources/[bpt_addons]/bpt_addoninventory/server/classes/addoninventory.lua +++ b/server-data/resources/[bpt_addons]/bpt_addoninventory/server/classes/addoninventory.lua @@ -1,11 +1,9 @@ -local self = {} - -self.name = name -self.owner = owner -self.items = items +local self, name, owner, items = {}, {}, {}, {} +self.name = name +self.owner = owner +self.items = items function CreateAddonInventory() - function self.addItem(name, count) local item = self.getItem(name) item.count = item.count + count