Skip to content

cc_jobcentre: troubleshooting

Start with two things, and paste both into any support ticket:

Start with two things, and paste both into any support ticket:

  1. The boot line in the server console. It starts cc_jobcentre — 4.0.0 | framework: ... and ends with N CONFIG PROBLEM(S) when the config has mistakes (each is printed in red above it, naming the entry and the field).
  2. /jobcentre_status (server console or an admin with cc_jobcentre.admin): framework, database, job count, every hidden listing and why, every registration.

In game, /jobcentre_selftest (ACE cc_jobcentre.diagnostics) checks what only the game can: the ped streamed, the blip, the target adapter, the item pictures, the page answering, and whether each job's coordinate is somewhere a person can stand.

Server console errors

ErrorCauseFix
Couldn't load resource cc_jobcentre: dependency cc_lib / No such export ... cc_libcc_lib missing or started after thisensure cc_lib above ensure cc_jobcentre
attempt to index a nil value (global 'CC')Same: cc_lib not started first, or a very old cc_libUpdate cc_lib to 1.7.0+ and fix the ensure order
attempt to index a nil value (global 'MySQL')oxmysql not started (only matters with Config.Features.persistence)ensure oxmysql first, or set Config.Features.persistence = false
Resource never starts, no error at allfxmanifest.lua was saved with a UTF-8 BOM by an editorRe-save it as UTF-8 without BOM (VS Code: bottom bar → "UTF-8")
Config.Jobs[n] (...): ... in redA config mistake, namedFix that field; the board starts without the broken entry meanwhile
no API key in convar cc_jobcentre_ai_key (yellow)The paid adviser has no keySupported setup: the free desk still answers. Add set cc_jobcentre_ai_key "..." to server.cfg, or set ServerConfig.Adviser.modelEnabled = false to silence it
N listing(s) hidden because their job script is not runningConfig.Board.hideUninstalled (default on)Start those job scripts, edit their provider, or set hideUninstalled = false
the board is emptyEvery listing is hiddenAs above
ServerConfig.Loans.enabled is true but oxmysql is not loadedLoans need the databaseensure oxmysql
<resource> could not list "<id>": ...Another script's registerJob was refused, with the reasonFix that script's listing, or add it to Config.Registry.allow if you restrict registrations

F8 (client) problems

SymptomCauseFix
The board opens blank or blackcolor-scheme: dark added to the CSS, or a CSS file edited into invalid syntaxRevert web/style.css; theme with Config.UI.accent and the tokens at the top of the file
Text shows as keys (tab.board, kpi.startup)A locale file was edited into invalid JSON, or cc_jobcentre_locale names a missing languageValidate locales/<lang>.json (jsonlint.com); setr cc_jobcentre_locale en
No player card in the headercc_lib older than 1.7.0 (no homebar)Update cc_lib. The page falls back to its own card meanwhile
Item pictures missing on "what you need"The inventory's image folder or item name differsCheck the item name in your inventory; harmless either way (a bullet shows)
Cannot click anything / mouse stuck after closingAnother resource took NUI focus at the same timePress Escape; if it repeats, see which resource holds focus with resmon/F8 and report it
Pressing the desk does nothingNo target resource and you are not inside the [E] box, or the target resource started after cc_libensure your target resource before cc_lib, or stand at the desk point (Config.Locations[].coords)

The board

A pin is in the wrong place. The job script lives somewhere else on your map. Stand at its real start, run /jobcentre_coords, paste the vec3 into that listing's coords. If every pin is off by the same amount you replaced the map image: re-check Config.Map.bounds.

Another script's job is missing. /jobcentre_status lists every registration and every hidden listing with the reason. A listing in Config.Jobs with the same id always wins over a registration.

The featured banner is empty. No id in Config.Featured is on the board for that player (hidden or not installed). Put ids of listings you actually run there, or {} to hide it.

The Business tab is missing. It needs Code Cartel's cc_business started and Config.Integrations.business not false.

The Start-up loans tab is missing. Loans are off by default: ServerConfig.Loans.enabled = true plus at least one entry in ServerConfig.Loans.jobs, and the job's shop must call drawStartupLoan (see exports-and-hooks.md).

The adviser

"I do not have a good answer to that." The free desk did not understand, and the paid fallback is off, has no key, or today's cap is spent. /jobcentre_spend says which. Asking about a job by name always works.

Questions never get an answer, but the board opens. Check cc_lib's version first (/jobcentre_status). Then turn on Config.Debug = true: three hop lines show where a question stops (page → client → server gate → handler).

Answers are about an old board. The cache clears itself when the board changes; run /jobcentre_cache to clear it by hand.

jobcentre_spend shows failed calls. The provider rejected the request: usually the model id (ServerConfig.Adviser.model) or the key. The failure reason is in the console and on the adviser webhook.

Performance

At rest the resource runs no client thread and one hourly server sweep. If resmon shows it above 0.01 ms with the board closed, Config.Debug is on (it draws the target box every frame): turn it off.