Error loading script server/main.lua HELP ME

C:\FXServer\run.cmd +exec server.cfg
Initializing Mono
Initializing Mono completed
Hello!
Resolved live-internal.fivem.net:30110 to 163.172.164.221:30110
Found new resource async in C:/FXServer/resources//async
Found new resource essentialmode in C:/FXServer/resources//essentialmode
Found new resource esx_menu_default in C:/FXServer/resources//esx_menu_default
Found new resource esx_menu_dialog in C:/FXServer/resources//esx_menu_dialog
Found new resource esx_menu_list in C:/FXServer/resources//esx_menu_list
Found new resource es_extended in C:/FXServer/resources//es_extended
Found new resource fivem in C:/FXServer/resources//fivem
Found new resource fivem-awesome1501 in C:/FXServer/resources//fivem-awesome1501
Found new resource fivem-map-hipster in C:/FXServer/resources//fivem-map-hipster
Found new resource fivem-map-skater in C:/FXServer/resources//fivem-map-skater
Found new resource mysql-async in C:/FXServer/resources//mysql-async
Found new resource runcode in C:/FXServer/resources//runcode
Found new resource esplugin_mysql in C:/FXServer/resources//[essentials]/esplugin_mysql
Found new resource es_admin2 in C:/FXServer/resources//[essentials]/es_admin2
Found new resource cron in C:/FXServer/resources//[esx]/cron
Found new resource esx_addonaccount in C:/FXServer/resources//[esx]/esx_addonaccount
Found new resource esx_addoninventory in C:/FXServer/resources//[esx]/esx_addoninventory
Found new resource esx_ambulancejob in C:/FXServer/resources//[esx]/esx_ambulancejob
Found new resource esx_billing in C:/FXServer/resources//[esx]/esx_billing
Found new resource esx_clotheshop in C:/FXServer/resources//[esx]/esx_clotheshop
Found new resource esx_datastore in C:/FXServer/resources//[esx]/esx_datastore
Found new resource esx_identity in C:/FXServer/resources//[esx]/esx_identity
Found new resource esx_policejob in C:/FXServer/resources//[esx]/esx_policejob
Found new resource esx_skin in C:/FXServer/resources//[esx]/esx_skin
Found new resource esx_society in C:/FXServer/resources//[esx]/esx_society
Found new resource esx_vehicleshop in C:/FXServer/resources//[esx]/esx_vehicleshop
Found new resource skinchanger in C:/FXServer/resources//[esx]/skinchanger
Found new resource speedo in C:/FXServer/resources//[esx]/speedo
Found new resource race in C:/FXServer/resources//[gamemodes]/race
Found new resource race-test in C:/FXServer/resources//[gamemodes]/race-test
Found new resource channelfeed in C:/FXServer/resources//[gameplay]/channelfeed
Found new resource irc in C:/FXServer/resources//[gameplay]/irc
Found new resource obituary in C:/FXServer/resources//[gameplay]/obituary
Found new resource obituary-deaths in C:/FXServer/resources//[gameplay]/obituary-deaths
Found new resource playernames in C:/FXServer/resources//[gameplay]/playernames
Found new resource mapmanager in C:/FXServer/resources//[managers]/mapmanager
Found new resource baseevents in C:/FXServer/resources//[system]/baseevents
Found new resource chat in C:/FXServer/resources//[system]/chat
Found new resource hardcap in C:/FXServer/resources//[system]/hardcap
Found new resource ■■■■■■■ in C:/FXServer/resources//[system]/■■■■■■■
Found new resource scoreboard in C:/FXServer/resources//[system]/scoreboard
Found new resource sessionmanager in C:/FXServer/resources//[system]/sessionmanager
Found new resource spawnmanager in C:/FXServer/resources//[system]/spawnmanager
Found new resource betaguns in C:/FXServer/resources//[test]/betaguns
Found new resource gameInit in C:/FXServer/resources//[test]/gameInit
Found new resource keks in C:/FXServer/resources//[test]/keks
Started resource sessionmanager
Started resource mapmanager
Started resource chat
Started resource spawnmanager
Started resource scoreboard
Started resource fivem
Started gametype Freeroam
Started resource hardcap
Started resource ■■■■■■■
Started resource speedo
Error loading script server/main.lua in resource esx_society: server/main.lua:186: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:186: in main chunk
Failed to load script server/main.lua.
Started resource esx_society
Error loading script server/main.lua in resource esx_billing: server/main.lua:73: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:73: in main chunk
Failed to load script server/main.lua.
Started resource esx_billing
CRON STARTED [12:56]
Started resource cron
Started resource esx_addonaccount
Started resource baseevents
Error loading script server/main.lua in resource esx_skin: server/main.lua:31: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:31: in main chunk
Failed to load script server/main.lua.
Started resource esx_skin
Started resource skinchanger
Error loading script server/main.lua in resource esx_clotheshop: server/main.lua:40: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:40: in main chunk
Failed to load script server/main.lua.
Started resource esx_clotheshop
Error loading script server/main.lua in resource esx_policejob: server/main.lua:128: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:128: in main chunk
Failed to load script server/main.lua.
Started resource esx_policejob
Started resource esx_datastore
Started resource esx_identity
Started resource esx_addoninventory
Error loading script server/main.lua in resource esx_ambulancejob: server/main.lua:19: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:19: in main chunk
Failed to load script server/main.lua.
Started resource esx_ambulancejob
Error loading script server/main.lua in resource esx_vehicleshop: server/main.lua:186: attempt to index a nil value (global ‘ESX’)
stack traceback:
server/main.lua:186: in main chunk
Failed to load script server/main.lua.
Started resource esx_vehicleshop
Loaded MySQLAsync.net, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_995575330
Instantiated instance of script MySQLAsync.MySQLAsync.
Started resource mysql-async
Started resource essentialmode
Started resource esplugin_mysql
Started resource es_admin2
Started resource es_extended
Authenticating server license key…
Server license key authentication succeeded. Welcome!
cfx> Sending heartbeat to live-internal.fivem.net:30110

Current version: 5.0.0
Updater version: 5.0.0

Everything is fine!

Started resource fivem-map-skater
Started map fivem-map-skater
Loaded MySqlConnector, Version=0.26.0.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_995575330
hitch warning: frame time of 191 milliseconds
Loaded System.Threading.Tasks.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_995575330
Loaded System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_995575330
hitch warning: frame time of 271 milliseconds

That error indicates an issue with your es_extended installation.

EDIT: Start es_extended before all of the other esx mods.

3 Likes

Thank you so much, it solved.

2 Likes

how did you fix it?

Read the posts…
"That error indicates an issue with your es_extended installation.
EDIT: Start es_extended before all of the other esx mods." - SaltyGrandpa

i’ve put the es_extended before all other esx resources, but esx_addoninventory and esx_society still can’t load a main.lua, please help

6 Likes

how can i start es_extended before the others?

Just place it higher in the server.cfg file.

lol sorry for my bad english -> i just wanna help you

i did but still give me error all the police job esx_billing esx_skin and other idk what to do

Try this:

If file is server/main.lua put this at start:

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

else if file is client/main.lua put this at start:

ESX = nil
Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

EDIT: Also if is not server/main.lua and its server.lua works ( the same with client )

1 Like

SCRIPT ERROR: @qb-inventory/server/main.lua:15: qb-inventory was unable to execute a query!
[ script:qb-inventory] Table ‘s3817_QBCORE.users’ doesn’t exist
[ script:qb-inventory] SELECT * from users WHERE identifier = ? [null]

Can someone help me its not really the same issue i know i need to change the name in my database but do i change player or user to the above s3817_QBCORE.users

hello everyone can you help me with this error?

Error loading script server/main.lua in resource esx_ambulancejob: @esx_ambulancejob/server/main.lua:85: attempt to index a nil value (global ‘ESX’)