You can't get anything out of the inventory of the cars
Closed this issue · 3 comments
You can't get anything out of the inventory of the cars
The following error is output:
�[91mSCRIPT ERROR: @esx_inventoryhud_trunk/server/esx_trunk-sv.lua:138: attempt to compare number with nil�[0m
If someone uses this script in 2020 with the newest Server Files on ESX here is the fix for it.
go into @esx_inventoryhud_trunk/server/esx_trunk-sv.lua:138 and change:
if targetItem.limit == -1 or ((targetItem.count + count) <= targetItem.limit) then
to:
if targetItem.limit == nil or ((targetItem.count + count) <= targetItem.limit) then
If you have the same problem on the Glovebox then do replace this:
if targetItem.limit == -1 or ((targetItem.count + count) <= targetItem.limit) then
with:
if targetItem.limit == nil or ((targetItem.count + count) <= targetItem.limit) then
restart your server and it should be Fixed.
@Fowman it doesn't resolve problem, it just deleting condition and doesn't support the weight system.
replace
if targetItem.limit == -1 or ((targetItem.count + count) <= targetItem.limit) then
with
if xPlayer.canCarryItem(item, count) then