$ErrSet: Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Increment or clear number of counting errors, set $ERRMSG</span> | <span class="pageSubtitle">Increment or clear number of counting errors, set $ERRMSG</span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.</p> | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the <var>$ErrSet</var> function.</p> | ||
This function allows you to set or clear the current error message (which is returned by $ERRMSG) and to increment or clear the number of "counting" errors. | This function allows you to set or clear the current error message (which is returned by $ERRMSG) and to increment or clear the number of "counting" errors. | ||
The $ErrSet function accepts one argument and returns a number indicating the current number of counting errors. As of <var class="product">[[Sirius Mods]]</var> Version 6.8, it is a callable $function . | The <var>$ErrSet</var> function accepts one argument and returns a number indicating the current number of counting errors. As of <var class="product">[[Sirius Mods]]</var> Version 6.8, it is a callable $function . | ||
The first argument is a string indicating the message to be returned by the next $ERRMSG call. If this argument is omitted or null, the current error message is cleared and the number of counting errors is set to 0; otherwise the number of counting errors is incremented. | The first argument is a string indicating the message to be returned by the next <var>$ERRMSG</var> call. If this argument is omitted or null, the current error message is cleared and the number of counting errors is set to 0; otherwise the number of counting errors is incremented. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> [%COUNT =] $ErrSet(string) | <p class="syntax"><section begin="syntax" /> [%COUNT =] $ErrSet(string) |
Revision as of 20:05, 19 October 2012
Increment or clear number of counting errors, set $ERRMSG
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ErrSet function.
This function allows you to set or clear the current error message (which is returned by $ERRMSG) and to increment or clear the number of "counting" errors.
The $ErrSet function accepts one argument and returns a number indicating the current number of counting errors. As of Sirius Mods Version 6.8, it is a callable $function .
The first argument is a string indicating the message to be returned by the next $ERRMSG call. If this argument is omitted or null, the current error message is cleared and the number of counting errors is set to 0; otherwise the number of counting errors is incremented.
Syntax
<section begin="syntax" /> [%COUNT =] $ErrSet(string) <section end="syntax" />
For example
%COUNT = $ErrSet('NASTY ERROR') %JUNK = $ERRMSG
would set %JUNK to 'NASTY ERROR' and would increment the number of counting errors.
You can also change the number of counting errors (the Sirius ERCNT parameter) with $Resetn.