The script is producing an error when attempting to move an item from the traphouse to a players inventory
Reproduction
Using the qb-traphouse resource open the inventory.
Move an item from player inventory to traphouse inventory.
Attempt to move item back.
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
Ignore it saying line 2039 that is due to me adding a print line to debug the issue.
Summary
The script is producing an error when attempting to move an item from the traphouse to a players inventory
Reproduction
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
Last Updated
last week
Custom Resources
qb-traphouse
Resource Rename
No