qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
50 stars 377 forks source link

[BUG] Can't pick items up @qb-inventory/server/main.lua:1950: attempt to index a nil value (field '?') #392

Closed nonstopjoker closed 9 months ago

nonstopjoker commented 1 year ago

Summary

Can't pick up dropped items, getting an error in server console when dragging items from ground to inventory: [ script:qb-inventory] SCRIPT ERROR: @qb-inventory/server/main.lua:1950: attempt to index a nil value (field '?')

Reproduction

  1. drag item from player inventory to drop inventory (right inventory)
  2. press tab near the dropped item, item shows up in dropped inventory (shows dropped-none, weight 0.00/100.00, not sure if that's normal)
  3. drag item from dropped inventory to player inventory, error shows up in server console ([ script:qb-inventory] SCRIPT ERROR: @qb-inventory/server/main.lua:1950: attempt to index a nil value (field '?'))
  4. item appears in player inventory
  5. re-open inventory
  6. item is no longer in player inventory and is still on the ground

Expected behavior

item should be able to be dragged from the drop inventory (right side inventory) to the player's inventory

Actual behavior

item stays on the ground after dropped, isn't able to get picked back up, and gives a script error in server console.

Additional context

no idea what's causing it, the line that is causing it contains: local fromItemData = Drops[fromInventory].items[fromSlot] I'm using completely default qb-inventory, no files are changed. I also tried installing a fresh copy, same thing. SQL is set up.

Last Updated

today

Custom Resources

I selected the qb-core framework when installing with txadmin when I first set up the server, so I have basically all qb-core framework resources, but I've disabled qb-atms, qb-banking, qb-garages, qb-vehicleshop, and the default qb-phone. I use about 50 other resources, but I've tried disabling them to see if it would fix this issue, but it didn't.

Resource Rename

no

Vulky commented 1 year ago

Did you ever resolve this? I'm having the same issue and can't figure it out for the life of me

github-actions[bot] commented 10 months ago

This issue has had 60 days of inactivity & will close within 7 days

DreadCentral commented 6 months ago

Just as FYI this is still an issue. Just installed the fresh QBCORE default recipe from TXADMIN and can't pick up dropped items. This also happened in the main city I play in though other players were not having the same issue. It seems to be related to the client side environment somehow.