Stellar AI

Errors

QBCore 'No such export GetCoreObject in resource qb-core' – Fix

The error

SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua: No such export GetCoreObject in resource qb-core
SCRIPT ERROR: @my-resource/server/main.lua:3: attempt to call a nil value (field 'GetCoreObject')

What it means

A script called exports['qb-core']:GetCoreObject(), but FiveM could not find a running resource named exactly qb-core that had published that export. The error names qb-core, not the script that printed it. The usual causes are start order, a renamed folder, qb-core itself failing at boot (so it never published exports), or a Qbox server whose core is qbx_core.

The fix

-- server.cfg: database and core first, then everything that uses them
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure [qb]
ensure my-resource

The folder must be named exactly qb-core, not qb-core-main or qbcore. In the script, get the object with the current export rather than the old QBCore:GetObject event, which newer qb-core builds no longer answer:

-- top of every client and server file that needs the core
local QBCore = exports['qb-core']:GetCoreObject()

If dozens of scripts all throw this at once, scroll to the first red line about qb-core itself — often a database connection error — and fix that. On Qbox, start qbx_core and remove any leftover qb-core folder so the two cores do not fight. Add dependency 'qb-core' to your fxmanifest.lua so FiveM refuses to start the script without the core.

These steps are for creators and server owners working on their own scripts. Test the change on a development server or in Studio before you put it live.

Related tools: QBCore script generator · Fix a FiveM Lua error · all script generators