DCode

Covers Engine 2.0.0

state

Persistent runtime storage, also available through ordinary runtime variables without a state prefix. Initialize before reading; arrays and objects can be stored here. Callbacks have ordinary per-call function scope rather than a persistent state store.

Syntax

state.<name>

Available in

  • Runtime block bodies
  • Shared helper functions

Native C++

Native state fields use the same DCode value types. Initialize a field before reading it.

Example

state.name