[ script:es_extended] SCRIPT ERROR: @es_extended/server/functions.lua:127: attempt to index a nil value (local 'xPlayer') [ script:es_extended] > ref (@es_extended/server/functions.lua:127)

Please help me im triggered af Thats my Fivem Console (TxAdmin) Nothing works Esx is completly broke after a server Restart

1

There are 1 answers

0
Jack Taylor On

I had a look at the source code. My best guess is that the player you are using isn't registered in the MySQL database for some reason.

I am guessing this because of the following:

  1. The immediate cause of the error is that xPlayer is nil in server/functions.lua:127
  2. This is due to the player object not being added to the ESX.Players table in server/main.lua:239
  3. The info necessary to make the player object is taken from MySQL on server/main.lua:115

So the most obvious explanation would be that the user wasn't found in the database. It is also possible that the program could not connect to the database at all, but it looks like the fivem-mysql-async library would raise an error instead of continuing silently, so that is less likely (although this would need testing to discount completely).

Are there any messages in the server logs that might give you a clue as to what's going on?