Skip to content

Compatibility quirks and compiler modes

Bornescript reads older GS2 scripts and runs them the way the older server did, with a short list of documented differences (differences from legacy GS2). A few behaviors of the older language are surprising on purpose. They stay, and the compiler warns about them.

Quirk What happens Warning
Empty array literal {} is allowed only as the whole right side of an assignment none (a compile error elsewhere)
Array method names insert(index, obj), delete(index), and remove(obj) are array operations when called as methods, even on an object that defines functions with those names W-ARRAY-METHOD-NAME on a function with one of those names
Reserved names level, head, dir, and similar names hide your fields and parameters W-RESERVED-NAME
Ternary with ! x ? y : !z works W-TERNARY-NOT (legacy warnings)
Missing ; a statement may end at the end of its line or before } W-MISSING-SEMICOLON
Array truthiness a non-empty array is false W-ARRAY-TRUTHINESS
sleep with setTimer sleep drops the pending timeout W-SLEEP-WITH-TIMER
Option Default Effect
legacy_warnings off warns wherever this engine knowingly behaves differently from the older one (W-LEGACY-DIFF-*), or accepts something the older one rejects
strict off turns W-ARRAY-METHOD-NAME, W-RESERVED-NAME, W-ARRAY-TRUTHINESS, W-TERNARY-NOT, W-MISSING-SEMICOLON, W-UNKNOWN-FUNCTION, and W-ARITY into errors

Strict mode never changes what a correct program does. It only turns warnings into errors, so a script that compiles in strict mode behaves the same in normal mode.

Set the options for one script with a first-line comment:

//#OPTIONS strict legacy_warnings

or for the whole server in the Server Options with compiler_strict and compiler_legacy_warnings.

Write new scripts with strict on. It catches misspelled function names and the quirks above while you type. Turn legacy_warnings on when you move older scripts to this engine, to find the places where they may behave differently.

The sample world compiles with no warnings in strict mode with legacy warnings on, with W-UNCHECKED-LOOKUP also on.

Engine version 0.1.0. Built 2026-11-18.