Nucleus handler tools › Docs › Checks

An option set too late

Warningtoo-lateA Nucleus check · Probably wrong: Nucleus runs it, but not the way you meant.

Why it matters

Nucleus reads some options (GUID, GameName, MaxPlayers, AddOption…) before any player starts. Set inside Game.Play or another function, they have no effect.

Example

✗ Wrong

Game.Play = function () {
  Game.MaxPlayers = 4;
};

✓ Right

Game.MaxPlayers = 4;
Game.Play = function () {
};

How to fix it

Move the line to the top level of the handler.

Turn it off, or change how it shows

Each check can be shown as an error, warning, info or hint, or turned off. VS Code: "splitscreenme.lint.rules": { "too-late": "off" } in your settings. Notepad++: Plugins › Nucleus Co-op handlers › Settings. Command line: ncdev lint --rule too-late=off. Other editors: the lint.rules setting of ncdev lsp.

Is this right? Tell us what's wrong
Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop