Problem: esx_drp_garage_stable/server/server.lua:124: attempt to compare number with nil

Good afternoon, I have a problem, I have already installed about 4 or 5 different scripts from the garage, and they all give me the same error, I don’t know much about programming, but by discard I think it will be some value from the database (I don’t have no idea), the error is as follows: @esx_drp_garage_stable/server/server.lua:124: attempt to compare number with nil. I attach a couple of photos of the error in the console, and the lines of code where it gives me the error, I wait for a response, thanks in advance.


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

i am having same issue did y solve it?

i have the same

and i have this problem did you slove it?

i have the same

i have the same

Alright im not familiar with ESX but I am with lua, them 3 […] on line 142 or supposed to be replaced with something, have a look at the post you downloaded it from and see if they have a documentation

Developed a fix for the problem. The money value check/alteration was not correct.

Line 124 in esx_drp_garage/server/server.lua looks smth. like this:
if xPlayer.get(‘money’) >= Config.Price then
correct is this (for esx):
if xPlayer.getMoney(‘money’) >= Config.Price then

change line 135 to this:
xPlayer.removeMoney(Config.Price)

Line 221 has to be like this:
xPlayer.removeMoney(price)

Makes the impound lot work, including taking the amount of money you set in the config from cash.

Don’t have a fix for the problem that vehicles multiply when you get them from the impound-lot repeatedly yet. Help is greatly appreciated.