#Notes
1 messages · Page 1 of 1 (latest)
You 100% sure your config is set up for ox inv?
Also, like the post about posting here mentions, did you enable debug?
Also, if your folder for the resource still has a "-main" you gotta remove that, as for like every other script out there
Config = {}
Config.Inventory = 'ox' -- qb or ox. nothing else will work
Config.Debug = false
Config.Items = { -- if you want to change the item names do it here
notepad = 'cwnotepad',
note = 'cwnote'
}
Did you just delete your message just so you could @ me with the same one and ignore the other 2 things I said AGAIN? 
Ah good. then provide the debug logs from the print outs
There you go. Now you have to check that error and see what's wrong. Your qbcore does not match the latest online so I cant help you there. It says the file and what line
Something aint working with your QBCore.Functions.HasItem
Does this help?
function QBCore.Functions.HasItem(items, amount)
local isTable = type(items) == 'table'
local isArray = isTable and table.type(items) == 'array' or false
local totalItems = #items
local count = 0
local kvIndex = 2
if isTable and not isArray then
totalItems = 0
for _ in pairs(items) do totalItems += 1 end
kvIndex = 1
end
for _, itemData in pairs(QBCore.PlayerData.items) do
if isTable then
for k, v in pairs(items) do
local itemKV = {k, v}
if itemData and itemData.name == itemKV[kvIndex] and ((not amount and not isArray and itemData.amount >= v) or (isArray and amount and itemData.amount >= amount) or (not amount and isArray)) then
count += 1
end
end
if count == totalItems then
return true
end
else -- Single item as string
if itemData and itemData.name == items and (not amount or (amount and itemData.amount >= amount)) then
return true
end
end
end
return false
end