Difference between revisions of "Quit"

From AGI Wiki
Jump to navigationJump to search
(Created page with "The '''quit''' command ends the game. == Syntax == quit(); '''(VERSION 2.089 ONLY)''' quit(byt MODE); '''(ALL OTHER VERSIONS)''' == Remarks == '''NOTE:''' In...")
 
 
Line 37: Line 37:
 
== See Also ==
 
== See Also ==
  
[[System Commands]]
+
[[System Commands]]<br />
 +
[[Category:Commands]]<br />

Latest revision as of 07:15, 19 April 2019

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:
quit(0);   [ player can choose to cancel
quit(1);   [ immediately quits the game

Technical Information

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

See Also

System Commands