Skip to main content

Errors

WhenExamplesWhat happens
Compile errorsyntax error, unknown builtin, wrong argument count, undefined variable, misspelled constant, unclosed string or commentNothing runs. Only the first error is reported, with its line and column. The diagnostic console and the config UI's editor show it.
Builtin failurewrong argument kind, a negative substring start, MathRandom(5, 1), an unknown message-box button name, an empty split delimiter, opening a serial port that Input.Observer already has openThe action stops at that call. Statements after it don't run, and the error is reported as BuiltinName: reason.
Soft resultoperators on mismatched kinds, dividing by zero, a null or closed window (its position, size or DPI reads as 0), an index out of range, a file that isn't there, a serial port that won't openNo error. You get 0, false, "", -1 or a null Window, and the script continues.

Common compile errors and what they mean:

You wroteWhy it failsWrite instead
i++; / i += 1;no increment or compound operatorsi = i + 1;
while (x) { … }while isn't a keyword, so it's read as an unknown functiona for loop
x = n % 2;there's no %x = n - (n / 2) * 2; or n & 1
'text'single quotes aren't string delimiters"text"
r = .5; / r = 1e3;no leading dot, no exponents0.5 / 1000.0
a = b = 0;assignment isn't an expressiona = 0; b = 0;
for (;;), for (i = 0, j = 0; …)init and step must each be one assignmentj = 0; for (i = 0; …; i = i + 1)
print(x)unknown function. Builtin names are exact and case-sensitive.UtilityPrint(…)
y = total + 1; as the first linetotal hasn't been assigned above this pointassign it first: total = 0;