getPropertyDefault: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function getPropertyDefault== {{ProposedChange}} Returns the default value of a token property. If the [[Campaign:property defaul...)
 
No edit summary
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
==Function getPropertyDefault==
{{MacroFunction
{{ProposedChange}}
|name=getPropertyDefault
Returns the [[Campaign:property default value| default value]] of a [[Token:property| token property]]. If the [[Campaign:property default value| default value]] contains nothing then an empty string ("") is returned.  
|version=1.3b48
|description=
Returns the [[Introduction to Properties#Creating Properties| default value]] of a [[Introduction_to_Tokens#Properties| token property]] for the [[Current Token]]. If the [[Introduction to Properties#Creating Properties| default value]] contains nothing then an empty string ({{code|""}}) is returned.  


<source lang="mtmacro" line>
|usage=
[h: val = getPropertyDefault(name)]
<syntaxhighlight lang="mtmacro" line>
</source>
getPropertyDefault(name)
getPropertyDefault(name, propType)
</syntaxhighlight>
 
'''Parameter'''
{{param|name|The name of the property to get the default value of.}}
{{param|propType|The token type to get the property from. Defaults to the token type of the [[Current Token]].}}
 
 
}}
[[Category:Token Function]][[Category:Property Function]]

Latest revision as of 20:59, 20 April 2023

getPropertyDefault() Function

Introduced in version 1.3b48
Returns the default value of a token property for the Current Token. If the default value contains nothing then an empty string ("") is returned.

Usage

getPropertyDefault(name)
getPropertyDefault(name, propType)

Parameter

  • name - The name of the property to get the default value of.
  • propType - The token type to get the property from. Defaults to the token type of the Current Token.