esx_drp_garage
esx_drp_garage copied to clipboard
Error while impounding a vehicle
Script Error : @esx_drp_garage/server/server.lua:124: attempt to compare number with table
TriggerServerCallback (@es_extendeed/server/functions.lua:152) handler (@es_extended/server/common.lua:83)
how to solve this issue store and spawn work fine impound is giving this error
Got same issue researching it
same, anyone know how to resolve it?
same here
replace line 124 with
if xPlayer.getMoney() >= Config.Price then
worked for me. It's using the wrong command to get player cash
I've a fix:
Anywhere in the server.lua file you see:
if xPlayer.get('money') >= Config.Price then
cb(true)
else
cb(false)
Replace it with:
local hasEnoughMoney = nil
local moneyonplayer = xPlayer.get('money')
if moneyonplayer >= Config.Price then
hasEnoughMoney = true
cb(true)
else
hasEnoughMoney = false
cb(false)
Basically the problem is down to us trying to compare a value with a function as opposed to comparing the value of a function with another value