Notes: ESX = nil is at the top of the file. Using ESX Legacy 1.9.0
I’m getting errors on a newly bought FiveM business script and the errors are pointing to
attempt to index a nil value (global ‘ESX’)
stack tracebackESX.RegisterServerCallback(‘esx_fivem_shop:getInventory’, function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
local items = xPlayer.inventorycb({items = items})
end)
And everything else ESX.RegisterServerCallback related in the exact same file.