Have a Problem with vehicleshop2


Error loading script server/main.lua in resource esx_vehicleshop2: @esx_vehicleshop2/server/main.lua:128: attempt to index a nil value (global ‘ESX’)
stack traceback:
@esx_vehicleshop2/server/main.lua:128: in main chunk
Failed to load script server/main.lua.

here main.lua:128
ESX.RegisterServerCallback(‘esx_vehicleshop2:getSoldVehicles’, function (source, cb)

please Help me! :frowning:

Add this to the top of the main.lua

ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)