getState: Difference between revisions
Jump to navigation
Jump to search
m (Macros:Functions:getState moved to getState: Moving out of the Macros namespace.) |
m (Added MacroFunction template and Token Function category) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=getState | |||
|description= | |||
Returns 1 if the specified [[Token:state|Token State]] is set on the [[Token:Current Token|Current Token]] otherwise it returns 0. | Returns 1 if the specified [[Token:state|Token State]] is set on the [[Token:Current Token|Current Token]] otherwise it returns 0. | ||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: isSet = getState(name)] | [h: isSet = getState(name)] | ||
</source> | </source> | ||
|examples= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[if(getState("Dead"), "You are dead!", "You are not dead (yet!)")] | [if(getState("Dead"), "You are dead!", "You are not dead (yet!)")] | ||
</source> | </source> | ||
}} | |||
[[Category:Token Function]] |
Revision as of 03:59, 8 March 2009
getState() Function
Returns 1 if the specified Token State is set on the Current Token otherwise it returns 0.
Usage
[h: isSet = getState(name)]
Examples
[if(getState("Dead"), "You are dead!", "You are not dead (yet!)")]