currentToken: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function currentToken== {{ProposedChange}} {{TrustedOnlyFunction}} Returns the id of the current token. In most cases this will return the same as [[Macros:Functions:getImpersonated | g...) |
No edit summary |
||
Line 3: | Line 3: | ||
{{TrustedOnlyFunction}} | {{TrustedOnlyFunction}} | ||
Returns the id of the current token. In most cases this will return the same as [[Macros:Functions:getImpersonated | getImpersonated()]] function. The difference is when it is called in a [[Macros:Rolls:token | [token(): ] ]] or after a call to the [[Macros:Functions:switchToken | switchToken()]] function, in both these cases it will return the id of the token being operated on, while [[Macros:Functions:getImpersonated | getImpersonated()]] will return the impersonated token. | Returns the id of the current [[token]]. In most cases this will return the same as [[Macros:Functions:getImpersonated | getImpersonated()]] function. The difference is when it is called in a [[Macros:Rolls:token | [token(): ] ]] or after a call to the [[Macros:Functions:switchToken | switchToken()]] function, in both these cases it will return the id of the [[token]] being operated on, while [[Macros:Functions:getImpersonated | getImpersonated()]] will return the [[impersonated token]]. | ||
===Usage=== | ===Usage=== | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: tokenId = currentToken()] | [h: tokenId = currentToken()] | ||
</source> | </source> |
Revision as of 13:47, 1 December 2008
Function currentToken
Note: This refers to a proposed change that has not been implemented in the main code base yet.
This function can only be called from a trusted macro
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 impersonated token.
Usage
[h: tokenId = currentToken()]