The Nyxtale platformReference
Diagnostic codes
Every code the compiler and validator can show you, and how to fix it.
Every code the engine can show you, and what to do about it. Generated from the DIAGNOSTIC_MESSAGES and DIAGNOSTIC_HINTS catalogues — the same ones Studio labels an error with in your editor. The wording here and the wording there are one wording.
Compiler 41
Syntax: the message arrives while you are still typing.
choice_at_invalid
`@at` requires two frame fractions: x and y.
Fix it For example: `@at 0.2 0.5` — left of centre, halfway down.
choice_cost_invalid
`@cost` requires a number and a currency.
Fix it For example: `@cost 15 keys`.
choice_icon_invalid
`@icon` requires an image name.
Fix it For example: `@icon cart_1`.
choice_modifier_unknown
Invalid choice modifier (allowed: `@cost`, `@if`, `@timer`, `@at`, `@icon`).
Fix it Allowed modifiers: `@cost`, `@if`, `@timer`, `@at`, `@icon`.
choice_syntax
A choice of the form `* choice "text"` was expected.
Fix it For example: `* choice "Go forward"`.
choice_text_missing
The choice is missing quoted text.
Fix it For example: `* choice "Go forward"`.
choice_timer_invalid
`@timer` requires a number (ms).
Fix it For example: `@timer 5000`.
content_warning_empty
`@content_warning` with no text is ignored.
Fix it For example: `@content_warning "violence"` or `@content_warning gore`.
content_warning_unknown_code
Unknown content-warning code «{code}» was skipped.
Fix it Use a code from the platform set (e.g. gore, self_harm, photosensitivity), or give the warning as quoted text.
craft_silent_stretch
{lines} lines in a row with no sound at all — the scene plays in silence.
Fix it One `@ambient` for the whole scene already holds the atmosphere; a separate `@sound` is for a beat, not for every line.
craft_slot_collision
«{who}» is placed where «{occupant}» already stands ({slot}).
Fix it Put them on opposite sides — `left` and `right`; otherwise one sprite simply replaces the other.
craft_unreleased_effect
`@{effect}` is switched on and never switched off — it follows the reader into the next scene.
Fix it If that is intended, nothing to do; otherwise close it before the scene ends.
directive_invalid
A directive name is expected after `@`.
Fix it For example: `@set`, `@if`, `@bg`.
effect_named_invalid
Named sub-flag `@{sub}` requires a value.
Fix it For example: `@jumpscare shadow_figure @sound stinger_01`.
expr_expected
Expected an expression, found «{found}».
Fix it An operand is required here: a number, variable, call, or `(`.
expr_paren
Unbalanced parenthesis in expression.
Fix it Add `)`.
expr_trailing
Unexpected trailing token «{token}» in expression.
Fix it Check the operator or a closing parenthesis.
i18n_empty_translation
{field}: the «{locale}» translation is empty.
i18n_invalid_locale
{field}: «{locale}» does not look like a BCP-47 language code.
Fix it Use a code like en, ru, pt-BR, zh-Hans.
i18n_missing_source
{field}: the source-language text (src) is missing.
Fix it src is the required source-language text; translations are added as extra keys.
if_target_missing
A jump target is expected after `->` in `@if`.
Fix it For example: `@if sanity <= 0 -> ending_madness`.
indent_unexpected
Unexpected indentation — the line is nested but there is no opening block.
Fix it Check indentation: only `@if`/`@unless` and `* choice` may open a nested block.
input_kind_invalid
The `@input` kind must be `text` or `number`.
Fix it For example: `@input age "How old are you?" number`.
input_prompt_missing
`@input` requires a quoted prompt.
Fix it For example: `@input hero_name "What is your name?"`.
input_var_missing
`@input` requires a variable name.
Fix it For example: `@input hero_name "What is your name?"`.
jump_target_missing
A jump target name (label or scene) is required.
Fix it Name the target — a label or a scene. For example: `-> go_deeper` or `@jump next_scene`.
label_name_missing
`@label` requires a name.
Fix it For example: `@label go_deeper`.
non_ascii_ident
The name «{word}» is not written in Latin letters.
Fix it Asset and character names are written in Latin letters — or put them in quotes: «"{word}"». The commands themselves (`@фон`) and the spoken text may be in any language.
nsx_version_invalid
`@nsx_version` requires an integer.
Fix it For example: `@nsx_version 1`.
nsx_version_missing
Missing required `@nsx_version` directive.
Fix it Add it at the top of the file, e.g. `@nsx_version 1`.
render_invalid
`@render` requires a theme core (identifier).
Fix it The theme core is an identifier; add mixins with `+`. For example: `@render horror + creepypasta`.
render_missing
No `@render` theme set; using `default`.
Fix it For example: `@render horror + creepypasta`.
scene_empty
The scene contains no nodes.
Fix it Add at least one reply, effect, or jump.
scene_missing
Scene name is not set.
Fix it Add `@scene <name>` or pass `scene` in the compile options.
scene_name_invalid
`@scene` requires an identifier.
Fix it For example: `@scene forest_clearing`.
set_op_invalid
`@set` requires operator `=`, `+=`, or `-=`.
Fix it For example: `@set courage += 1`.
set_var_missing
`@set` requires a variable name.
Fix it For example: `@set sanity -= 10`.
string_unterminated
Unterminated string quote.
Fix it Add the closing quote `"`.
syntax_unknown_line
Could not parse the line.
Fix it Expected a reply `speaker: text`, a directive `@…`, a `* choice`, or a jump `->`.
unexpected_char
Unknown character «{char}».
Fix it Expected an operator, number, identifier, or parenthesis.
unknown_function
Unknown function «{name}».
Fix it Available: rand, min, max, clamp, abs.
Validator 36
Story integrity: the graph, flags, assets, rights.
NSX_ALIAS_DUPLICATE
alias «{alias}» is assigned to more than one canonical keyword
Fix it One alias maps to exactly one canonical keyword.
NSX_ALIAS_FLAG_COLLISION
alias «{alias}» equals a declared flag name
Fix it The grammar tells them apart by `@`, but identical names hurt readability and grep.
NSX_ALIAS_RESERVED
alias «{alias}» is a reserved word or not a valid keyword token
Fix it An alias is a single identifier (letters/digits/`_`), not a builtin-expression or a logical word.
NSX_ALIAS_SHADOWS_CANON
alias «{alias}» equals a canonical keyword of a different directive
Fix it Choose a name not already taken by a canonical keyword.
NSX_ALT_TEXT_MISSING
node «{id}»: visual asset in {effect} has no alt text for the screen reader (§17)
Fix it Add `@alt "…"` — an image description for the screen reader's linearization.
NSX_ASSET_NOT_RESOLVABLE
asset «{id}»: the value «{url}» is not an absolute URL — a reader can load nothing from it
Fix it Upload the file via «Resources» — publishing substitutes its permanent address (https://…). A relative filename is not an address.
NSX_BASE_AUDIO_UNKNOWN
node «{id}»: effect {effect} references a base-library sound that does not exist «{ref}»
Fix it Check the id, or pick a sound from the base library.
NSX_BROKEN_REF
Broken reference: target not found among the scene's nodes.
Fix it Fix the reference or add the missing node (check the entry node name too).
NSX_CHOICE_AT_CROWDED
node «{id}»: options {a} and {b} sit almost on the same point — a finger cannot tell them apart
Fix it Move the regions at least {min} of the frame apart.
NSX_CHOICE_AT_PARTIAL
node «{id}»: {placed} of {total} options carry a place — the rest have nowhere to be drawn
Fix it Give every option an `@at` or none: a choice is drawn either as regions on the picture or as a list.
NSX_CHOICE_AT_RANGE
node «{id}»: option {option} is placed at {axis} {value} — a frame fraction is between 0 and 1
Fix it 0 is the left/top edge, 1 the right/bottom. The middle of the frame is `@at 0.5 0.5`.
NSX_DEAD_END
node «{id}» is a dead end: neither a continuation nor an explicit ending
Fix it Add a next/jump or an end node.
NSX_EFFECT_ARG
node «{id}»: invalid argument for effect {effect}
Fix it Check the effect's arguments: their count, type, and order.
NSX_EFFECT_MISPLACED
node «{id}»: «{effect}» belongs on a choice option header, not on a line of its own
Fix it Move it onto a choice option header: `* choice "…" @{effect} …`.
NSX_EMPTY_CHOICE
choice node «{id}» has no options
Fix it Add at least one option, or replace the node with an end/jump.
NSX_EXPR_FLAG_TYPE
expression: type inconsistency in comparison ({op})
Fix it Compare values of the same type.
NSX_EXPR_UNKNOWN_FLAG
expression: reference to undeclared variable «{var}»
Fix it Declare the variable in flags_schema, or fix the name.
NSX_FLAG_TYPE
node «{id}»: variable type inconsistency ({op})
Fix it Compare same-typed values; use `@set =` for bool, and arithmetic only on int.
NSX_HOLD_DURATION
node «{id}»: hold duration {value} ms is outside the allowed bounds {min}–{max}
Fix it Set an integer number of milliseconds within {min}–{max}, e.g. `@hold_to_act 1500`.
NSX_HOLD_NO_FALLBACK
node «{id}»: hold with no accessible alternative — the gesture becomes the only way forward (§17 motor accessibility)
Fix it Keep fallback on (the default), or add a tap/confirm alternative to the hold.
NSX_INPUT_TYPE
node «{id}»: @input {kind} requires a «{expected}» variable, but «{var}» is «{actual}»
Fix it Match the variable's type to the `@input` kind: number → int, text → str.
NSX_INTENSITY_SUPPRESSED
node «{id}»: effect {effect} is muted at zero intensity (§17)
NSX_IP_BLOCKED
publication blocked: ip_clearance = «blocked»
Fix it Wait for rights clearance (cleared) before publishing.
NSX_LICENSE_ATTRIBUTION
license «{license}» requires attribution, but it is empty
Fix it Fill in attribution with the source/author of the original (§15).
NSX_MISSING_ASSET
node «{id}»: effect {effect} references a missing resource «{ref}»
Fix it Upload the resource to the story, or check its id.
NSX_PHOTOSENSITIVE_LIMIT
node «{id}»: effect {effect}, «{arg}» = {value} exceeds the safe threshold {safeMax} (§17 photosensitivity)
Fix it The client will clamp the value; lower the frequency/amplitude for comfort.
NSX_PHOTOSENSITIVE_SUPPRESSED
node «{id}»: effect {effect} is disabled in "soft effects" mode (§17)
Fix it Make sure this beat's carrying signal also exists without the visual (A16).
NSX_READ_BEFORE_WRITE
node «{id}»: variable «{var}» may be read before assignment (no default in schema)
Fix it Set a default in flags_schema, or assign it with @set before reading.
NSX_REDUCE_MOTION_MISSING
node «{id}»: photosensitive effect {effect} has no declared reduce-motion alternative (§17)
Fix it Add `@reduce_motion off` (hide), `@reduce_motion keep` (safe), or the name of a replacement effect.
NSX_TRAP_CYCLE
node «{id}» is part of an escapeless cycle: no ending is reachable from it
Fix it Add a branch to an end, or an exit condition for the loop.
NSX_UNKNOWN_EFFECT
node «{id}»: unknown effect «{effect}»
Fix it A typo in the directive, or a plugin mechanic is required (§11).
NSX_UNKNOWN_FLAG
node «{id}»: reference to undeclared variable «{var}»
Fix it Declare the variable in flags_schema, or fix the name.
NSX_UNKNOWN_NAMED_ARG
node «{id}»: effect {effect} has no named argument «{arg}»
NSX_UNKNOWN_VOCAB_ID
node «{id}»: effect {effect} references «{ref}» ({vocab}) — no scene in the story ever introduces that id
Fix it That id has to be introduced somewhere in the story, where it is handed out. Check the spelling.
NSX_UNREACHABLE
node «{id}» is unreachable from entry
Fix it Link it from a reachable node, or remove it.
NSX_UNREACHABLE_END
ending «{id}» is not reachable by any path from entry
Fix it Add a path to this ending, or remove it.