Skip to main content

Debugging

ConsoleError

ConsoleError(x)

Displays an error message in the browser console.

ConsoleInspect

x.ConsoleInspect -> x
ConsoleInspect(x) -> x

Displays a value in the browser console, and returns the same value. This allows it to be placed in the middle of an expression without affecting the result.

let x = ConsoleInspect(42);

ConsoleLog

ConsoleLog(x)

Displays a message in the browser console.

Panic

Panic(msg)

Immediately halts the game, and displays the given error message along with a stack trace.

Since this stops the game entirely, this function should only be used to help debug issues, and should not be used in the normal flow of game logic.