Attempt to compare nil with number ! Please!

SCRIPT ERROR: @t1ger_cardealer/server/server.lua:81: attempt to compare nil with number
> ref (@t1ger_cardealer/server/server.lua:81)
>  (@mysql-async/mysql-async.js:14959)

this is the error !!

my code : (@t1ger_cardealer/server/server.lua:81)

my code : > (@mysql-async/mysql-async.js:14959)

2 Likes

what the error mean its you try to compare nothing to a number, so varibel that is nil is the problem, let me read your code and i will try to help you.

v.repaytime seen to be the problem,
check your database if there is a repaytime in the database.

1 Like

repaytime ??
I dont get you please elaborate !!

1 Like

Here Is SQL table with data of VEHICLE_DISPLAY !!

and Here Is VEHICLES SQL !!

3 Likes

Don’t know how much help you are going to get using a paid/leaked script. As mentioned before it’s a problem with repay time or finance time. So either learn to figure out what it is exactly or use another vehicle shop.

Has nothing to do with the database lines you posted as those don’t even have those columns it’s looking for.

1 Like

I saw the problem its the sql line, cause its trying to find something in owned_vehicles, but repaytime is in vehicle_display.

1 Like

hey bro thanks !!! i got it and fixed !!!

no worries, =)

1 Like

bro! i recently added t1ger car dealer its good, but the sale vehicle located outside has no description to buy.
Also how do you get the ambulance , ems and the police jobs to work without esx vechileshop? since the only available one is tiger car dealer… im getting error when i try to spawn cars from there jobs as it is dependent on esx.vechileshop… says it needs plategenertor etc

how??

Just get an another car dealer from somewhere. You don’t have to check the esx_ambulancejob and esx_policejob. Like the sp one is so good. You can try those.

Did you get it from leak or something. I have it properly working. The trophy truck has options as the other vehicles inside the dealership.

Are you using esx legacy. I think you are. If yes, then I will make a release of the same ambulancejob and the policejob using the t1ger_cardealer.

I have the same problem but with an other script, for me it is in esx_vehicle_invertory

Take the advice from this topic.

You’re trying to compare a number to a value which is nil. We can’t directly help you, you’ve got to help yourself by reading your stacktrace and finding which line your error is on and fixing the problematic variable :slight_smile: