[ESX] [HELP] attempt to index a nil value (global 'ESX')

Hello, I have been searching up and down, I haven’t found anyone else who has had this error to this extent.

Might be something very stupid I did, but can anyone vouch?

Remove all resources and add 1 by 1.
And what are you using, es_extended 1/es_extended 2 or extendedmode?

Using es_extended, what do you mean…? Like re add all of them 1 by 1?

Where in your server.cfg is es_extended being started?

start es_extended
start esx_menu_default
start esx_menu_list
start esx_menu_dialog

Those should all be loaded before all of the other ESX resources, and if you are using mysql-async, that should be above es_extended.

This is what my cfg looks like.

# Essential ESX Scripts (Do not touch)
set es_startingCash "10000"
start essentialmode
start esplugin_mysql
start es_admin2
start es_ui

# ESX Scripts
start mysql-async
start es_extended
start esx_menu_default
start esx_menu_dialog
start esx_menu_list
start async
start cron
start instance
start es_camera
start skinchanger
start esx_accessories
start esx_addonaccount
start esx_addoninventory
start esx_society
start esx_phone
start esx_policejob
start esx_ambulancejob
start esx_animations
start esx_atm
start esx_bankerjob
start esx_barbershop
start esx_basicneeds
start esx_billing
start esx_boat
start esx_boilerplate
start esx_clotheshop
start esx_cruisecontrol
start esx_datastore
start esx_dmvschool
start esx_drugs
start esx_garage
start esx_holdup
start esx_identity
start esx_joblisting
start esx_jobs
start esx_license
start esx_lscustom
start esx_mechanicjob
start esx_migrate
start esx_optionalneeds
start esx_property
start esx_realestateagentjob
start esx_rpchat
start esx_service
start esx_shops
start esx_sit
start esx_skin
start esx_status
start esx_taxijob
start esx_vehicleshop
start esx_voice
start esx_weaponshop
start esx_doorlock

Depending on where you got your es_extended from, if it’s the latest version you don’t need essentialmode, I would try commenting out these lines:

start essentialmode
start esplugin_mysql
start es_admin2
start es_ui

and see if that helps.

No luck… Have my cfg labeled like this

# Essential ESX Scripts (Do not touch)
#start essentialmode
#start esplugin_mysql
#start es_admin2
#start es_ui

# ESX Scripts
start mysql-async
start es_extended
start esx_menu_default
start esx_menu_dialog
start esx_menu_list
start async
start cron
start instance
start skinchanger
start esx_accessories
start esx_addonaccount
start esx_addoninventory
start esx_society
start esx_phone
start esx_policejob
start esx_ambulancejob
start esx_animations
start esx_atm
start esx_bankerjob
start esx_barbershop
start esx_basicneeds
start esx_billing
start esx_boat
start esx_boilerplate
start esx_clotheshop
start esx_cruisecontrol
start esx_datastore
start esx_dmvschool
start esx_drugs
start esx_garage
start esx_holdup
start esx_identity
start esx_joblisting
start esx_jobs
start esx_license
start esx_lscustom
start esx_mechanicjob
start esx_migrate
start esx_optionalneeds
start esx_property
start esx_realestateagentjob
start esx_rpchat
start esx_service
start esx_shops
start esx_sit
start esx_skin
start esx_status
start esx_taxijob
start esx_vehicleshop
start esx_voice
start esx_weaponshop
start esx_doorlock 

Still getting the same error on most of the esx scripts labeled as

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

Updated es_extended, removed essentialmode, es_admin2, es_ui, and esplugin_mysql. Removed all esx scripts and database, and re did them. Fixed.

3 Likes

What do you mean “removed all esx script and database” ?

I deleted all of my scripts for ESX and cleared a database, and re did everything

1 Like

I must be stupid excuse me ^^, but I have to delete for example esx_taxi and you redid the whole script without the ESX? I don’t understand the process ^^

Maybe your es_extended version is too high/low for the script.