spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Game / Global functions

AbortGame

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


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.