End the script
SCRIPT_END · opcode 0xf1 · 1 byte
Script virtual machine · Opcode list · Control flow
Stops the script that is running. Pending subroutine calls are discarded.
Encoding
| Offset | Type | Field | Meaning |
|---|---|---|---|
| 0 | u8 | opcode | 0xf1 |
The instruction has no operands.
Behavior
The handler sets the run's stop flag and clears the return-stack depth used by Call a subroutine. The interpreter loop sees the flag and returns to the game; the next instruction is not executed.1
Edge cases and unknowns
- Unlike Return from a call, the instruction ends the run even inside a subroutine.