qbcore-framework / qb-inventory

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

fix: amount is nil in `GetTotalWeight` + misc lint issues #517

Open Z3rio opened 1 month ago

Z3rio commented 1 month ago

Description

Upon running /giveitem 1 radio 1, you'll run into the following error. image (First print is raw item json, second print is weight & amount)

Perhaps this should be looked into more deeply, as the amount value should be defined here. Aswell as the fact that this error might be happening at other places

Perhaps, this is caused by the radio being a unique item?

Checklist

Z3rio commented 1 month ago

That last nil value in the lint report is fixed by my other PR.

ChristianBDev commented 1 month ago

I have personally tried this and cannot replicate the issue, how recent is all your qb files? If up to date is there any errors before this?

Z3rio commented 1 month ago

I have personally tried this and cannot replicate the issue, how recent is all your qb files? If up to date is there any errors before this?

Ran a completely fresh install a couple minutes before this.