qb-inventory icon indicating copy to clipboard operation
qb-inventory copied to clipboard

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

Open Z3rio opened this issue 9 months ago • 4 comments

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

  • [x] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
  • [x] My code fits the style guidelines.
  • [x] My PR fits the contribution guidelines.

Z3rio avatar May 25 '24 15:05 Z3rio