Attempt to index a nil value (global 'ESX')

I just couldn´t figure out what the problem is can someone help me with the police job.

Heres the error:

And the code:

main.lua (9.9 KB)

Which version of ESX are you using?

ESX Legacy

I assuming you are using the newest ESX Legacy version.

Try adding the following code in your fxmanifest.lua:
shared_script "@es_extended/imports.lua"

and remove the following lines out of the lua files:

ESX = nil

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

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