TwistedMe2u
Member
If you have your own FiveM server and you are running ESX platform; you have come across the error
Replace that code above with this code:
Please like this if it helped you!!! THANKS!!!
attempt to index a nil value (global 'ESX')
this is a ESX version issue for version greater than 1.9 and scripts that are attempting to retrieve ESX shared object in a way thats been depreciated. Please remove code in the files where the ESX object is being set to "nil" and the function usually right after it that is retrieving the shared object. Please see example bad code below
Code:
ESX = nil
TriggerEvent(
"esx:getSharedObject",
function(obj)
ESX = obj
end
)
Replace that code above with this code:
Code:
ESX = exports['es_extended']:getSharedObject()
Please like this if it helped you!!! THANKS!!!