Error loading script server/main.lua:76: attempt to index a nil value (global 'ESX') I've been searching for a long time, please help

Hello,

I’m new to fivem server making in esx and I don’t know why I’m getting these errors, I’ve searched on internet and no luck.
I already tried some things but can’t figure out how to fix it, please help me!

Found new resource esx_datastore in D:/FXServer\server-data/resources//[esx]/esx_datastore
Found new resource esx_mechanicjob in D:/FXServer\server-data/resources//[esx]/esx_mechanicjob
Found new resource esx_policejob in D:/FXServer\server-data/resources//[esx]/esx_policejob
Found new resource esx_skin in D:/FXServer\server-data/resources//[esx]/esx_skin
Found new resource esx_society in D:/FXServer\server-data/resources//[esx]/esx_society
Found new resource esx_taxijob in D:/FXServer\server-data/resources//[esx]/esx_taxijob
Found new resource esx_vehicleshop in D:/FXServer\server-data/resources//[esx]/esx_vehicleshop
Found new resource esx_voice in D:/FXServer\server-data/resources//[esx]/esx_voice
Found new resource basic-gamemode in D:/FXServer\server-data/resources//[gamemodes]/basic-gamemode
Found new resource chat in D:/FXServer\server-data/resources//[gameplay]/chat
Found new resource chat-theme-gtao in D:/FXServer\server-data/resources//[gameplay]/chat-theme-gtao
Found new resource playernames in D:/FXServer\server-data/resources//[gameplay]/playernames
Found new resource mapmanager in D:/FXServer\server-data/resources//[managers]/mapmanager
Found new resource spawnmanager in D:/FXServer\server-data/resources//[managers]/spawnmanager
Found new resource baseevents in D:/FXServer\server-data/resources//[system]/baseevents
Found new resource hardcap in D:/FXServer\server-data/resources//[system]/hardcap
Found new resource ■■■■■■■ in D:/FXServer\server-data/resources//[system]/■■■■■■■
Found new resource runcode in D:/FXServer\server-data/resources//[system]/runcode
Found new resource scoreboard in D:/FXServer\server-data/resources//[system]/scoreboard
Found new resource sessionmanager in D:/FXServer\server-data/resources//[system]/sessionmanager
Found new resource sessionmanager-rdr3 in D:/FXServer\server-data/resources//[system]/sessionmanager-rdr3
Found new resource example-loadscreen in D:/FXServer\server-data/resources//[test]/example-loadscreen
Found new resource fivem in D:/FXServer\server-data/resources//[test]/fivem
Found new resource esx_menu_default in D:/FXServer\server-data/resources//[esx]/[ui]/esx_menu_default
Found new resource esx_menu_dialog in D:/FXServer\server-data/resources//[esx]/[ui]/esx_menu_dialog
Found new resource esx_menu_list in D:/FXServer\server-data/resources//[esx]/[ui]/esx_menu_list
Found new resource fivem-map-hipster in D:/FXServer\server-data/resources//[gamemodes]/[maps]/fivem-map-hipster
Found new resource fivem-map-skater in D:/FXServer\server-data/resources//[gamemodes]/[maps]/fivem-map-skater
Found new resource redm-map-one in D:/FXServer\server-data/resources//[gamemodes]/[maps]/redm-map-one
Found new resource webpack in D:/FXServer\server-data/resources//[system]/[builders]/webpack
Found new resource yarn in D:/FXServer\server-data/resources//[system]/[builders]/yarn
Creating script environments for sessionmanager
Started resource sessionmanager
Creating script environments for webadmin
Instantiated instance of script FxWebAdmin.BaseServer.
Instantiated instance of script FxWebAdmin.HttpServer+HttpServerScript.
Started resource webadmin
Creating script environments for monitor
[txAdminClientLUA] Version 2.5.0 starting...
[txAdminClientJS] Logger started
Started resource monitor
Creating script environments for mapmanager
Started resource mapmanager
Creating script environments for chat
Started resource chat
Started resource spawnmanager
Started gametype Freeroam
Started resource basic-gamemode
Started resource fivem
Creating script environments for hardcap
Started resource hardcap
Creating script environments for ■■■■■■■
Started resource ■■■■■■■
Started resource scoreboard
Creating script environments for mysql-async
Started resource mysql-async
Creating script environments for baseevents
Started resource baseevents
Creating script environments for async
Started resource async
Creating script environments for cron
Started resource cron
Started resource skinchanger
Creating script environments for es_extended
[esx] [@events] load
[esx] [@class] load
[esx] [@account] load
[esx] [@table] load
[esx] [@string] load
[esx] [@async] load
[esx] [@command] load
[esx] [@datastore] load
[esx] [@db] load
[esx] [@game.hud] load
[esx] [@identity] load
[esx] [@player] load
[esx] [@input] load
[esx] [@interact] load
[esx] [@inventory] load
[esx] [@math] load
[esx] [@migrate] load
[esx] [@utils] load
[esx] [accessories] load
[esx] [skin] load
[esx] [society] load
[esx] [voice] load
Started resource es_extended
Creating script environments for essentialmode
Instantiated instance of script SQLite.Main.
Started resource essentialmode
Started resource esx_menu_default
Started resource esx_menu_list
Started resource esx_menu_dialog
Creating script environments for es_admin2
Started resource es_admin2
Creating script environments for esx_addonaccount
Started resource esx_addonaccount
Creating script environments for esx_addoninventory
Started resource esx_addoninventory
Creating script environments for esx_datastore
Started resource esx_datastore
Creating script environments for esx_billing
Error loading script server/main.lua in resource esx_billing: @esx_billing/server/main.lua:40: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_billing/server/main.lua:40: in main chunk
Failed to load script server/main.lua.
Started resource esx_billing
Started resource esx_voice
Creating script environments for esx_skin
Error loading script server/main.lua in resource esx_skin: @esx_skin/server/main.lua:38: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_skin/server/main.lua:38: in main chunk
Failed to load script server/main.lua.
Started resource esx_skin
Creating script environments for esx_society
Error loading script server/main.lua in resource esx_society: @esx_society/server/main.lua:158: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_society/server/main.lua:158: in main chunk
Failed to load script server/main.lua.
Started resource esx_society
Started resource esx_animations
Creating script environments for esx_vehicleshop
Error loading script server/main.lua in resource esx_vehicleshop: @esx_vehicleshop/server/main.lua:98: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_vehicleshop/server/main.lua:98: in main chunk
Failed to load script server/main.lua.
Started resource esx_vehicleshop
Creating script environments for esx_policejob
Error loading script server/main.lua in resource esx_policejob: @esx_policejob/server/main.lua:148: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_policejob/server/main.lua:148: in main chunk
Failed to load script server/main.lua.
Started resource esx_policejob
Creating script environments for esx_ambulancejob
Error loading script server/main.lua in resource esx_ambulancejob: @esx_ambulancejob/server/main.lua:79: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_ambulancejob/server/main.lua:79: in main chunk
Failed to load script server/main.lua.
Started resource esx_ambulancejob
Creating script environments for esx_mechanicjob
Error loading script server/main.lua in resource esx_mechanicjob: @esx_mechanicjob/server/main.lua:229: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_mechanicjob/server/main.lua:229: in main chunk
Failed to load script server/main.lua.
Started resource esx_mechanicjob
Creating script environments for esx_taxijob
Error loading script server/main.lua in resource esx_taxijob: @esx_taxijob/server/main.lua:76: attempt to index a nil value (global 'ESX')
stack traceback:
	@esx_taxijob/server/main.lua:76: in main chunk
Failed to load script server/main.lua.
Started resource esx_taxijob
Creating script environments for esx_aiomenu
Started resource esx_aiomenu
Started resource loadscreen
1 Like

Maybe u are using es_extended v2?

1 Like

I have the same error using es_extended v2, what can i do??

1 Like

im not using es_extended v2, but actually dont know what to do

1 Like

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