QB-vehicleshop - SCRIPT ERROR

QB-Vehicleshop was working perfectly fine until a few days ago when i added some cars and a new Poly zone, now im getting this error

SCRIPT ERROR: @qb-vehicleshop/client.lua:97: attempt to index a nil value (field ‘Vehicles’)

I looked at the other wrning with this script but i dont see anything wrong with it.

please help

It seems the syntax QBCore uses has been updated which is causing this error. Try changing QBCore.Shared.Vehicles on line 97 to QBShared.Vehicles (or see what it should be called by looking into qbcore/shared/vehicles.lua to see what variable name should be used if you are using a different version)

ok, and would i have to rename all of the QBcore.shared.vehicles to QBshared.Vehicles?

Yes that’s right

ok because when i do that the vehicles do not load and don’t show

Do not change to QBShared…you have an issue with your qb-core/shared/vehicles.lua

Just try a fresh vehicles.lua file and see if it works. If so, adding or editing a car caused your issue.

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