Abort

From Kolmafia
Revision as of 13:20, 25 February 2010 by imported>StDoodle
Jump to navigation Jump to search

Function Syntax

Halts all queued functions and the entire script it is called from. Often used for error-handling.

Code Sample

This code will abort the script if run by the "wrong" character.

if (my_name() != "MrPicky") {
  abort("I don't want you to run this script, mister!");
}

CLI Equivalent

Also available as the CLI command "abort," which will not be queued (similarly stops execution of all remaining commands when parsed).