Esx_inventoryhud & esx_inventoryhud_trunk lua error

Hello together,

i’m getting an error since i installed the esx_inventoryhud_trunk ressource, i even reinstalled it twice to make sure, i didn’t forget something but it doesn’t solved the error.

That is my error in the server console

[script:esx_inventory] SCRIPT ERROR: @esx:inventoryhud/server/storage.lua:13: attempt to index a nil value (local 'store')

And thats the code in esx_inventoryhud/server/storage.lua

ESX.RegisterServerCallback(
    "esx_inventoryhud:getStorageInventory",
    function(source, cb, storage)
        local targetXPlayer = ESX.GetPlayerFromId(target)
        local weapons, items, blackMoney

        TriggerEvent(
            "esx_datastore:getSharedDataStore",
            storage,
            function(store) 
                
                weapons = store.get("weapons") -- line 13

                if weapons == nil then
                    weapons = {}
                end

                TriggerEvent(
                    "esx_addoninventory:getSharedInventory",
                    storage,
                    function(inventory)
                        items = inventory.items

                        if items == nil then
                            items = {}
                        end

                        TriggerEvent(
                            "esx_addonaccount:getSharedAccount",
                            storage .. "_blackMoney",
                            function(account)
                                if account ~= nil then
                                    blackMoney = account.money
                                else
                                    blackMoney = 0
                                end

                                cb({inventory = items, blackMoney = blackMoney, weapons = weapons})
                            end
                        )
                    end
                )
            end
        )
    end
)

Its really funny, cause it is the default esx_inventoryhud & esx_inventoryhud_trunk from Github like everyone uses and nobody else gets the same error like me, maybe someone had encountered this error before.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.