currentToken: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page CurrentToken to currentToken: Converting page titles to lowercase)
m (Text replacement - "source>" to "syntaxhighlight>")
Line 7: Line 7:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
currentToken()
currentToken()
</source>
</syntaxhighlight>
'''Parameters'''   
'''Parameters'''   


Line 16: Line 16:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r:id = currentToken()]
[r:id = currentToken()]
</source>
</syntaxhighlight>


|also=
|also=

Revision as of 17:03, 14 March 2023

currentToken() Function

Introduced in version 1.3b48
Returns the id of the Current Token. In most cases this will return the same as getImpersonated() function. The difference is when it is called in a [token():] or after a call to the switchToken() function, in both these cases it will return the id of the token being operated on, while getImpersonated() will return the id of the impersonated token.

Usage

<source lang="mtmacro" line> currentToken() </syntaxhighlight> Parameters

None.

Examples

Get the Token ID of the Current Token.

<source lang="mtmacro" line> [r:id = currentToken()]

</syntaxhighlight>

See Also

Version Changes

  • 1.3b51 - No longer a trusted function.