AbortGame(string message, ...)
Aborts the game and returns to the operating system.
The standard AGS error dialog is displayed, with the script line numbers and call stack,
along with message (which can include %d and %s Display-style tokens).
You can use this function rather than QuitGame if you are writing some debugging checks
into your script, to make sure that the user calls your functions in the correct way.
This command should ideally never be called in the final release of a game.
Example:
function MakeWider(int newWidth) {
if (newWidth < 10)
AbortGame("newWidth expects a width of at least 10!");
}
will abort the game if MakeWider is called with a parameter less than 10.
SeeAlso: QuitGame
|