qbcore-framework / qb-inventory

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

[BUG] Grabbing wrong portion of traphouse inventory label #409

Closed xZToxicZx closed 10 months ago

xZToxicZx commented 1 year ago

Summary

The script is producing an error when attempting to move an item from the traphouse to a players inventory

Reproduction

  1. Using the qb-traphouse resource open the inventory.
  2. Move an item from player inventory to traphouse inventory.
  3. Attempt to move item back.
  4. Error here

Expected behavior

The item should be able to move from the traphouse inventory to the player inventory

Actual behavior

The script produces a error on line 2038: local traphouseId = QBCore.Shared.SplitStr(fromInventory, "-")[2] This causes the script to grab "traphouse_1" instead of just "1"

Simple fix would be this: local traphouseId = QBCore.Shared.SplitStr(fromInventory, "_")[2]

Additional context

image Ignore it saying line 2039 that is due to me adding a print line to debug the issue.

Last Updated

last week

Custom Resources

qb-traphouse

Resource Rename

No

github-actions[bot] commented 10 months ago

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