qbcore-framework / qb-inventory

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

fix nil value for giveitem #290

Closed bamablood94 closed 2 years ago

bamablood94 commented 2 years ago

Describe Pull request Fixes Nil Value given in console after using /giveitem command with a missing 3rd arguement.

When you do /giveitem id item amount, if you dont specify the amount of items then you get a nil value error in console/chat. This fixes that

Questions (please complete the following information):

bamablood94 commented 2 years ago

Alright, this sould be a fresh branch with just the one change

TonybynMp4 commented 2 years ago

tbh could've just changed the if amount > 0 then to if amount and amount > 0 then

jnccloud commented 2 years ago

This was actually already fixed in:

https://github.com/qbcore-framework/qb-inventory/commit/2e042e69e67f5fe91fc8bf094adcdf8a05900e26

This should be closed..