high
confirmed
QBCore · AGN-KB-QB-0001
attempt to index a nil value — the QBCore core object was nil
The message
attempt to index a nil value
This is an error in one of AGN's own scripts, not on your computer. Clearing your cache or reinstalling will not change it — sending us the exact red text is the useful thing you can do.
What you see
- A resource does nothing at all, or only some of its features work
- The F8 console shows the error once at startup, or every time an action is used
- It may affect every player or only players who joined at a particular time
What usually causes it
- The resource ran before QBCore was available and never retried
- The GetCoreObject retry was wrapped in CreateThread, which defers it — the rest of the file then registers with QBCore still nil, and it fails later at call time with no boot error
- A function above a `local x` declaration binds the nil global instead: it compiles clean and fails only when called
- Load order: the resource starts before qb-core in the config
- PlayerData accessed before the player has loaded in
Worth checking first
- Identify the resource and file:line from the error
- Check whether the error appears at resource start or only on a player action
- Check the resource's load order relative to qb-core
- Check whether it affects one player or everyone
Safe steps, one at a time
- Player-side: nothing. This is a server code problem — report it with the exact F8 text
- Staff: capture the full stack trace, the resource name and version, and whether it is one player or everyone
- Staff: check the core-object bootstrap pattern in the named file before changing anything else
These are suggestions, not instructions. Do only what you are comfortable with, back up anything important first, and stop if a step does not match what is on your screen. Advice, risk and responsibility.
When to stop and ask staff
Always staff. If it affects everyone, it is an incident: the resource is effectively down.
Looks like
AGN resource / QBCore
What staff will need
- Exact F8 / console error including file and line
- Resource name and version
- Whether one player, several, or everyone
- Last known working time
- Any recent deploy to that resource
Applies to
QBCore; check the resource against the current qb-core version on the affected server (Main or Dev).
Last reviewed Fri Sep 18.