-
Notifications
You must be signed in to change notification settings - Fork 0
API Special Values
Compiler-provided context values available inside script code.
$state and $args are not constructors or global objects. They are context values the compiler supplies, so they are read directly rather than constructed or called.
Important
Neither name can be used as a CompileBlock parameter name.
Returns
The ScriptObject user state the host supplied when it created the ScriptDomain, or null when no state exists.
Behavior
Read-only from the script side. Treat the shape of the state object as a contract with the host.
Example
@module(MAIN);
export func userName() {
return $state.Name;
}Returns
The collection of every argument the current function call received, readable through length and numeric indexes.
Tip
Prefer explicit function parameters. Use $args only when variable arity is genuinely part of the function's contract.
Example
@module(MAIN);
export func last() {
return $args[$args.length - 1];
}AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License