Quit

From Sierra Wiki
Revision as of 11:19, 28 January 2022 by sierraw>Andrew Branscom (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The quit command ends the game.

Syntax

quit(); (VERSION 2.089 ONLY)

quit(byt MODE); (ALL OTHER VERSIONS)

Remarks

NOTE: In version 2.089, the quit command had no arguments.

If MODE is 1, the game will quit instantly. If it is any other number, a prompt is presented to the player, who can chose to quit or continue playing.

Possible Errors

Code using this command written for a version 2.089 game will crash AGI if run on other versions (and vice versa).

Example

Code:

<syntaxhighlight lang="agi"> quit(0); [ player can choose to cancel quit(1); [ immediately quits the game </syntaxhighlight>

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 134 (0x86 hex)

See Also

System Commands