Free guides

FiveM/ESX errors and how to fix them

The fixes for the bugs that block server owners the most. Clear and to the point. Different case? Try it in the AI tool.

Error

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

The most common ESX Legacy error. We explain the cause and the definitive fix so ESX loads before your resource.

View solution
Error

attempt to call a nil value (field 'getMoney')

ESX changed its API: getMoney() no longer exists. Here is the correct method to read the player's money.

View solution
Error

oxmysql won't connect / connection string error

If oxmysql won't start or throws a connection error, it's almost always the connection string. Here's the correct format.

View solution
Error

NUI: fetch / RegisterNUICallback not responding

If your NUI interface doesn't talk to Lua, it's almost always the resource name in the fetch URL. Solution and the correct pattern.

View solution
Error

ACE permissions not working (add_ace / add_principal)

An admin command or menu won't let you in even though you have permissions. It's almost always a permission name that doesn't match. How to fix it.

View solution
Cómo se hace

How to create a job in ESX Legacy

Create a new job on your ESX server: SQL for jobs and grades, and how to assign it. A clear guide with examples.

View solution
Error

A resource won't start (couldn't start resource)

Your resource doesn't start and the console complains. We go over the most common causes: fxmanifest, dependencies and load order.

View solution
Error

attempt to perform arithmetic on a nil value

This Lua error pops up when you do a math operation with a variable that is nil. We explain how to find the culprit and harden it.

View solution
Error

event %s does not exist, or was not safe for net

Your TriggerServerEvent or TriggerClientEvent isn't arriving. It's almost always because the net event isn't registered with RegisterNetEvent. Here's the fix.

View solution
Error

unexpected symbol near '<something>'

A syntax error stops your resource from loading. We teach you how to read the message and find the brace, parenthesis or comma that's extra or missing.

View solution
Optimización

Warning: Script took too long to execute

Slow-script warnings and server stutters almost always come from a loop without a Wait. We explain how to find it and fix it.

View solution
Cómo se hace

Migrate from mysql-async to oxmysql

mysql-async and ghmattimysql are deprecated. We explain how to move your queries to oxmysql, the standard, maintained connector.

View solution
Cómo se hace

How to grant admin permissions in ESX

We explain how to assign the admin group to a player in ESX, from the database and with ACE permissions, so they have access to the admin commands.

View solution
Error

The server doesn't appear in the FiveM list

If your server doesn't show in the list or nobody can join, it's almost always the ports or the endpoint. We explain how to set it up right.

View solution
Optimización

Optimize your FiveM server and reduce lag

FiveM server lag is almost always a resource that spends too much. We teach you to measure with resmon and find the culprit.

View solution
Error

attempt to index a nil value (global 'QBCore')

QBCore's equivalent of the classic ESX error. How to get the core object correctly and the right load order.

View solution
Error

@ox_lib/init.lua could not be found

Your resource depends on ox_lib but the server can't find it. The real cause and fix: folder name, startup order and shared_script.

View solution
Error

Couldn't start resource

The server won't start a resource and shows "Couldn't start resource". The 4 real causes (manifest, dependencies, syntax and files) and how to fix it.

View solution
Cómo se hace

Create a command in FiveM with RegisterCommand

Learn to create /coords, /heal or admin commands in FiveM with RegisterCommand, server-authoritative and with ACE permission control.

View solution
Cómo se hace

The crxative CLI: AI on your own FiveM server

Install the Crxative-M CLI on your VPS and fix, create and audit scripts from the terminal, with an AI that knows ESX, QBCore, Qbox and ox.

View solution
Error

Failed to verify protected resource (escrow)

The error you get with paid escrow (.fxap) scripts. Here's why it happens and how to link the key so it loads.

View solution
Error

attempt to concatenate a nil value

Happens when you join (..) a variable that is nil. We show you how to find which one and protect it.

View solution
Error

No such export in a resource

You call an export that doesn't exist or the resource didn't load. We explain the 3 causes and the fix.

View solution
FiveM/ESX guides — errors and fixes | Crxative-M