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.
Compile errors
Section titled “Compile errors”E-UNEXPECTED-SYMBOL
Section titled “E-UNEXPECTED-SYMBOL”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 }.
E-UNEXPECTED-EOF
Section titled “E-UNEXPECTED-EOF”The file ended inside a construct. A block, a string, or a parenthesis is not closed.
E-UNTERMINATED-STRING
Section titled “E-UNTERMINATED-STRING”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.
E-UNTERMINATED-COMMENT
Section titled “E-UNTERMINATED-COMMENT”A /* comment has no */.
E-KEYWORD-CASE
Section titled “E-KEYWORD-CASE”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.
E-CASE-SENSITIVE
Section titled “E-CASE-SENSITIVE”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.
E-EMPTY-ARRAY-POSITION
Section titled “E-EMPTY-ARRAY-POSITION”{} 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.
E-OBJECT-LITERAL
Section titled “E-OBJECT-LITERAL”{key: value} is not a value in this language. Create a TStaticVar and set its variables, or use arrays.
E-NOT-LVALUE
Section titled “E-NOT-LVALUE”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.
E-ASSIGN-IN-CONDITION
Section titled “E-ASSIGN-IN-CONDITION”A plain assignment is the whole condition of if, while or do ... while, as in if (k = 0). Compare with ==.
E-READONLY-FIELD
Section titled “E-READONLY-FIELD”A plain write to a read-only field such as this.name or this.id.
E-ASSIGN-CONST
Section titled “E-ASSIGN-CONST”A write to a name made by const or enum.
E-DUPLICATE-FUNCTION
Section titled “E-DUPLICATE-FUNCTION”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.
E-DUPLICATE-CONST
Section titled “E-DUPLICATE-CONST”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.
E-BREAK-OUTSIDE-LOOP
Section titled “E-BREAK-OUTSIDE-LOOP”break outside a loop or a switch.
E-CONTINUE-OUTSIDE-LOOP
Section titled “E-CONTINUE-OUTSIDE-LOOP”continue outside a loop.
E-AWAIT-OUTSIDE-ASYNC
Section titled “E-AWAIT-OUTSIDE-ASYNC”await was used in a function that is not marked async. Add async before function.
E-TRY-WITHOUT-HANDLER
Section titled “E-TRY-WITHOUT-HANDLER”A try block has neither catch nor finally.
E-RANGE-POSITION
Section titled “E-RANGE-POSITION”A range |a, b| was used somewhere other than right after in.
E-NONCONSTANT
Section titled “E-NONCONSTANT”A const or enum value is not a constant expression. Use literals, other constants, arithmetic, and joining.
Strict versions of warnings
Section titled “Strict versions of warnings”In strict mode these warnings are errors with the same meaning.
E-STRICT-ARRAY-METHOD-NAME
Section titled “E-STRICT-ARRAY-METHOD-NAME”Strict version of W-ARRAY-METHOD-NAME.
E-STRICT-RESERVED-NAME
Section titled “E-STRICT-RESERVED-NAME”Strict version of W-RESERVED-NAME.
E-STRICT-ARRAY-TRUTHINESS
Section titled “E-STRICT-ARRAY-TRUTHINESS”Strict version of W-ARRAY-TRUTHINESS.
E-STRICT-TERNARY-NOT
Section titled “E-STRICT-TERNARY-NOT”Strict version of W-TERNARY-NOT.
E-STRICT-MISSING-SEMICOLON
Section titled “E-STRICT-MISSING-SEMICOLON”Strict version of W-MISSING-SEMICOLON.
E-STRICT-UNKNOWN-FUNCTION
Section titled “E-STRICT-UNKNOWN-FUNCTION”Strict version of W-UNKNOWN-FUNCTION.
E-STRICT-ARITY
Section titled “E-STRICT-ARITY”Strict version of W-ARITY.
Warnings
Section titled “Warnings”W-DUPLICATE-CLIENTSIDE
Section titled “W-DUPLICATE-CLIENTSIDE”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.
W-SERVEROPTIONS-CLIENT
Section titled “W-SERVEROPTIONS-CLIENT”serveroptions was used in client code. It is always empty there.
W-SHADOWS-BUILTIN
Section titled “W-SHADOWS-BUILTIN”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.
W-UNKNOWN-FUNCTION
Section titled “W-UNKNOWN-FUNCTION”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.
W-ARRAY-METHOD-NAME
Section titled “W-ARRAY-METHOD-NAME”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.
W-RESERVED-NAME
Section titled “W-RESERVED-NAME”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.
W-ARRAY-TRUTHINESS
Section titled “W-ARRAY-TRUTHINESS”if (x) where x is known to be an array. A non-empty array counts as false. Write if (x != NULL), or test .size().
W-TERNARY-NOT
Section titled “W-TERNARY-NOT”c ? a : !b. It works here, but older servers reject it without parentheses.
W-MISSING-SEMICOLON
Section titled “W-MISSING-SEMICOLON”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 ;.
W-SLEEP-WITH-TIMER
Section titled “W-SLEEP-WITH-TIMER”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.
W-ARITY
Section titled “W-ARITY”A call passes more arguments than the function declares or the built-in takes.
W-SQL-ESCAPE
Section titled “W-SQL-ESCAPE”.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.
W-SLEEP-IN-FRAME-EVENT
Section titled “W-SLEEP-IN-FRAME-EVENT”sleep inside onUpdate or onFixedUpdate delays every frame.
W-SCRIPT-GLOBAL
Section titled “W-SCRIPT-GLOBAL”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..
W-UNCHECKED-LOOKUP
Section titled “W-UNCHECKED-LOOKUP”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.
W-LEGACY-DIFF-LITERAL-LIST
Section titled “W-LEGACY-DIFF-LITERAL-LIST”A string literal is used as a list. Older servers do not convert it. See differences from legacy GS2.
Warnings from the editor
Section titled “Warnings from the editor”W-TYPE-MISMATCH
Section titled “W-TYPE-MISMATCH”A value contradicts a type annotation. See type annotations. The compiler never reports this one.
Engine version 0.1.0. Built 2026-11-18.