assert: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
From b49 announcements:
{{MacroFunction
|name=Assert
|version=1.3b49
|description=
Halts execution and prints a custom error message if a condition is zero.  Note that the error message will be displayed in chat even if the command itself is in a [H: ] block.


* New function: assert(condition, message) - if condition is zero, halts execution and prints a custom error message. 
|usage=
 
<source lang="mtmacro" line>
Note that the error message will be displayed in chat even if the command itself is in a [H: ] block.
[h: assert(condition, message)]
</source>
}}

Revision as of 03:16, 6 March 2009

Assert() Function

Introduced in version 1.3b49
Halts execution and prints a custom error message if a condition is zero. Note that the error message will be displayed in chat even if the command itself is in a [H: ] block.

Usage

[h: assert(condition, message)]