getLabel: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function getLabel== Returns the Token:label for the current Token:token. ===Usage=== <source lang="mtmacro" line> [h: label = getLabel()] </source>) |
No edit summary |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
= | {{stub|Examples of usage.}} | ||
{{MacroFunction | |||
|name=getLabel | |||
|version=1.3b48 | |||
|description= | |||
Returns the [[Introduction_to_Mapping#Changing_a_Token.27s_Name.2C_GM_Name.2C_and_Label|Token Label]] for a specific [[Token]]. | |||
|usage= | |||
<syntaxhighlight lang="mtmacro" line> | |||
getLabel() | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="mtmacro" line> | |||
getLabel(tokenRef) | |||
</syntaxhighlight> | |||
'''Parameter''' | |||
{{param|tokenRef|Either the token [[getSelected|{{code|id}}]] or [[getTokenName|Token Name]] of the token that has its [[Introduction_to_Mapping#Changing_a_Token.27s_Name.2C_GM_Name.2C_and_Label|Token Label]] returned, defaults to the [[Current Token]]. {{TrustedParameter}} }} | |||
{{Note|Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.}} | |||
== | |also= | ||
{{func|setLabel}} | |||
[ | |||
|changes= | |||
{{change|1.3b51|Added {{code|id}} parameter option.}} | |||
}} | |||
[[Category:Token Function]] |
Latest revision as of 23:59, 13 May 2024
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
This article needs: Examples of usage.
getLabel() Function
• Introduced in version 1.3b48
Returns the Token Label for a specific Token.
Usage
getLabel()
getLabel(tokenRef)
Parameter
tokenRef
- Either the tokenid
or Token Name of the token that has its Token Label returned, defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.
See Also
Version Changes
- 1.3b51 - Added
id
parameter option.