Get counters: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle m get_counters() returns string |
imported>Bale mNo edit summary |
||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 27: | Line 26: | ||
cli_equiv=The CLI command "counters" can be used to show, clear, or add to current turn counters.| | cli_equiv=The CLI command "counters" can be used to show, clear, or add to current turn counters.| | ||
}} | }} | ||
[[Category:Adventuring]] |
Latest revision as of 22:18, 21 May 2010
needs(code_samples);
Function Syntax
string get_counters(string label ,int minTurns ,int maxTurns )
- label specifies the counters of interest - it is a case-insensitive, substring match. An empty string matches any counter that is capable of triggering an action when it expires: purely informational counters are ignored in this case.
- minTurns and maxTurns specify the endpoints (inclusive) of the range to be checked. Passing the same value for both checks for an expiration on that specific turn.
Determines if a counter will expire in a specified period of time.
Return value is an empty string if there are no matching counters; the counter name if there is only one; or a tab-delimited list of names if there were multiple matches.
CLI Equivalent
The CLI command "counters" can be used to show, clear, or add to current turn counters.