qbcore-framework / qb-vehiclesales

Player Vehicle Sales For QB-Core
GNU General Public License v3.0
31 stars 165 forks source link

Simple fix for error #35

Closed WEEZOOKARP closed 2 years ago

WEEZOOKARP commented 2 years ago

When you have more vehicles for sale than there are spaces players get errors, tested this fix on my server and it works pretty well. When all spaces are taken new vehicles will not be spawned until a space is opened

MonkeyWhisper commented 2 years ago

Testing on live server.

vosscat commented 2 years ago

error remain client/man.lua:360: attempt to compare nil with number

MonkeyWhisper commented 2 years ago

Yup, that is correct. Error still remains there.

WEEZOOKARP commented 2 years ago

works for me so i don't know how exactly you are getting errors especially since your errors are coming from completely separate lines from the error that caused me to create this pull

vosscat commented 2 years ago

image It's the same line 360 error where you wanna list your car as used for sale. The other one on line 287 is when you wanna sale your car directly.

MonkeyWhisper commented 2 years ago

image It's the same line 360 error where you wanna list your car as used for sale. The other one on line 287 is when you wanna sale your car directly.

Oh wait a minute. I was not getting that error. Can you try clearing your server cache, restart and let me know?

WEEZOOKARP commented 2 years ago

image 10 cars going into 9 slots gives this error image the pull request limits the number of vehicles spawned to a value set in the config file. this number should be the same as the number of spaces your vehicles can be parked in or lower if you want to for whatever reason

WEEZOOKARP commented 2 years ago

the error scrreenshot above is what i fixed not the error vosscat was getting

vosscat commented 2 years ago

image It's the same line 360 error where you wanna list your car as used for sale. The other one on line 287 is when you wanna sale your car directly.

Oh wait a minute. I was not getting that error. Can you try clearing your server cache, restart and let me know?

same error

vosscat commented 2 years ago

the error scrreenshot above is what i fixed not the error vosscat was getting

i thought it because you mentioned the issue which is the same as mine

WEEZOOKARP commented 2 years ago

i looked at the error and it looked the same but I didn't notice the lines were different so just went for it