Difference between revisions of "Set.simple"

From AGI Wiki
Jump to navigationJump to search
(Created page with "The '''set.simple''' command creates an automatic game description for saved games. == Syntax == set.simple(str sA); == Remarks == When this command executes, t...")
 
 
Line 40: Line 40:
 
== See Also ==
 
== See Also ==
  
[[System Commands]]
+
[[System Commands]]<br />
'''[[save.game]]'''
+
'''[[save.game]]'''<br />
 +
[[Category:Commands]]<br />

Latest revision as of 19:55, 21 April 2019

The set.simple command creates an automatic game description for saved games.

Syntax

set.simple(str sA);

Remarks

When this command executes, the text of string sA is set as the the default game description. If the length of sA is greater than 31 characters, only the first 31 characters are used as the default game description.

Subsequent calls to save.game and restore.game will automatically use the first save game file in the current save game directory (or the game directory, if a save game directory hasn't been selected yet) with the default description, without showing the game selection window or other prompts.

If there is no save game file with the default description, the first call to save.game will create one automatically, unless the drive is full; in this case the player will be asked to choose a game to overwrite. If the restore.game command is called when there are no save game files that have the default save game description, a bug in AGI will display the restore game selection window, with the selection arrow appearing outside the window.

If sA is a zero-length string, set.simple restores normal save game functionality.

Possible Errors

None.

Example

Code:
set.string(s3, "autosave"); 
set.simple(s3);
save.game(); [  game saved to next slot, description automatically set to "autosave"

Technical Information

Required Interpreter Version: Available in version 2.915 and above.
Byte-Code Value: 170 (0xAA hex)

See Also

System Commands
save.game