For the complete documentation index, see llms.txt. This page is also available as Markdown.

High-value compiler errors

GPC4001 — naming conflict

Variables, definitions, enum members, and const-data names share the data-symbol namespace:

const uint8 strength[] = { 10, 20 };
int strength; // conflict

Function names, combo names, and function parameters use separate namespaces/scopes, although keywords and built-in names are still reserved.

Rename one symbol. Also avoid built-in function/constant names.


GPC4002 — undefined identifier

Check spelling, case, platform prefix, missing definition, and whether the name belongs to an internal/deprecated surface intentionally excluded from the guide.


GPC4003 — scoped variable unsupported

main {
    int local_value; // invalid
}

Move runtime declarations to top level. Only function parameters are local.


GPC4018 — invalid const array structure

Every 2D row needs equal length:


GPC4020 / GPC4021 — const index out of range

Indexes begin at zero. For size N, valid indexes are 0..N-1.


GPC4022 / GPC4023 — variable slot index under/overflow

Correct the runtime-array index or size/alias design. Validate dynamic indexes before access.


GPC4031 — missing second index

A 2D const array normally needs [row][column], except valid address-style records.


GPC5102 — data not constant

Definitions, enum values, data(...), const values, and array sizes cannot depend on runtime variables/functions.


GPC5106 — unsupported literal type

Declare strings in const data; do not pass a bare string where an integer/address expression is required.


GPC5125 — inconsistent return

Do not mix return; and return value; in the same function.


GPC5126 — invalid addr

Pass a const array/string/image/ADT item, not a runtime variable or arbitrary expression.


GPC5130..GPC5132 — built-in argument failure

Check argument count, required constant/variable form, exact accepted constant family, and numeric range against the function reference.


GPC5135 — unused required return

Consume the result:


GPC5143 — variable limit exceeded

Live limit: 1,020 slots. Reduce runtime arrays, move immutable data to const arrays, and remove obsolete state.


GPC5144 — bytecode limit exceeded

Live maximum: 65,519 bytes. Measure before optimizing.


GPC5153 — argument outside hard range

Clamp/correct the source calculation. A runtime expression that might be out of range still needs explicit protection even when the compiler cannot prove it.

Last updated