Skip to content

Warnings and errors

The compiler reports problems with a code, a file, a line, and a column. Codes starting with E- are errors: the half of the file that has one is not loaded. Codes starting with W- are warnings: the script still runs. In strict mode some warnings become errors with the code E-STRICT- and the rest of the name (compatibility quirks).

The editor shows the same codes. In the playground and on the RC screen, a code links to its entry here.

The parser met a token it did not expect, for example a closing brace with no opening one. Check the line named in the message and the line before it for a missing ;, ), or }.

The file ended inside a construct. A block, a string, or a parenthesis is not closed.

A double-quoted string has no closing quote before the end of the file, or a single-quoted one has none on its line. A double-quoted string may span lines.

A /* comment has no */.

A keyword such as if, function, or return was written with a capital letter (IF, Function). The legacy server only knows the lower-case words, so Borne asks for them too. true, false, and null have the same rule, but TRUE and FALSE are not errors: as in legacy they are ordinary variables that hold the empty value. NULL is accepted as the null value. The operators SPC, NL, and TAB are the opposite: only the capitals are operators.

One of the script functions strlen, int, sin, abs, max, random, format or the methods .size(), .length(), .pos(), .substring(), .tokenize() was written with a capital letter. The legacy server finds them only in lower case and reports “Function Strlen not found” when the call runs. Other names (degToRad, loadFolder, sortByValue), server functions such as echo or findplayer, event names, and your own function names ignore case.

{} was used anywhere but as the whole right side of an assignment, as in return {}; or f({}). Write temp.a = {}; first and use the variable.

{key: value} is not a value in this language. Create a TStaticVar and set its variables, or use arrays.

The left side of an assignment is not a variable or a field, as in 1 = 2; or a + b = 3;. A call (this.f("x") = 1;) and a number with a compound operator (5 *= .8;) compile like on the legacy server, and the assignment is dropped.

A plain assignment is the whole condition of if, while or do ... while, as in if (k = 0). Compare with ==.

A plain write to a read-only field such as this.name or this.id.

A write to a name made by const or enum.

Two functions have the same name, or names that differ only by case. Function names ignore case. Two handlers of the same object, function Obj.onEvent() twice, are not an error: the later one replaces the earlier one.

Two constants have the same name. A const written after an unnamed enum may reuse the name of one of its members; the const wins.

break outside a loop or a switch.

continue outside a loop.

await was used in a function that is not marked async. Add async before function.

A try block has neither catch nor finally.

A range |a, b| was used somewhere other than right after in.

A const or enum value is not a constant expression. Use literals, other constants, arithmetic, and joining.

In strict mode these warnings are errors with the same meaning.

Strict version of W-ARRAY-METHOD-NAME.

Strict version of W-RESERVED-NAME.

Strict version of W-ARRAY-TRUTHINESS.

Strict version of W-TERNARY-NOT.

Strict version of W-MISSING-SEMICOLON.

Strict version of W-UNKNOWN-FUNCTION.

Strict version of W-ARITY.

A second //#CLIENTSIDE line. Only the first one splits the file; later ones are plain comments, and the rest of the file stays client code.

serveroptions was used in client code. It is always empty there.

Your function has the name of a built-in. Your function wins, and the built-in is hidden in this file. Rename it unless you meant to replace the built-in.

A call to a name that is not declared in the file, not built in, and not provided by a class that is joined in the file. Check the spelling. A function that a class adds at run time with join is not visible to the compiler, so call it as this.name(...). A function that only exists on the server also gives this warning when it is called in client code.

A function is named insert, delete, or remove. A call written as a method on an array always means the array operation, so your function can be hidden. Rename the function.

A this. field or a parameter is named level, head, dir, or another name that the engine already uses. The engine’s field hides yours. Rename it.

if (x) where x is known to be an array. A non-empty array counts as false. Write if (x != NULL), or test .size().

c ? a : !b. It works here, but older servers reject it without parentheses.

A statement ends at the end of its line, or before }, without ;. It works, as it does on older servers, but a second statement on the same line still needs the ;. Add the ;.

A script uses sleep and setTimer. A sleep drops the pending timeout, so the timer may stop. Call setTimer again after the sleep, or use waitfor.

A call passes more arguments than the function declares or the built-in takes.

.escape() was used to build text for requestsql or requestsql2. On SQLite, .escape() is not safe. Pass the values as a last array argument and use ? in the statement, or use escapestring2.

sleep inside onUpdate or onFixedUpdate delays every frame.

A name without a prefix is written in one function and read in another. It is probably a script-global variable by accident. Use this. or temp..

The result of findnpc, findplayer, or a similar lookup is used without a test for null in the same function. This warning is off by default.

A string literal is used as a list. Older servers do not convert it. See differences from legacy GS2.

A value contradicts a type annotation. See type annotations. The compiler never reports this one.

Engine version 0.1.0. Built 2026-11-18.