getAllPropertyNames: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function getAllPropertyNames== {{ProposedChange}} Gets a Macros:string list containing the the property names that are defined in the campaign properties. ===Usage=== <source ...) |
|||
Line 2: | Line 2: | ||
{{ProposedChange}} | {{ProposedChange}} | ||
Gets a [[Macros:string list|string list]] containing the the property names that are defined in the [[campaign properties]]. | Gets a [[Macros:string list|string list]] containing the the [[Token:token property|token property]] names that are defined in the [[Campaign:campaign properties|campaign properties]]. | ||
===Usage=== | ===Usage=== | ||
Line 11: | Line 11: | ||
</source> | </source> | ||
If type is specified then the [[Macros:string list|string list]] contains the property names for that type, otherwise it will contain the property names for all property | If type is specified then the [[Macros:string list|string list]] contains the [[Token:token property|property] names for that [[Token:token property type|token property type]], otherwise it will contain the [[Token:token property|token property]] names for all [[Token:token property type|token property type]]s. If delim is specified then it is used to separate the values in the [[Macros:string list|string list]], if it is not specified then it defaults to ','. | ||
===Examples=== | ===Examples=== | ||
You can use the following code to print out all of the properties in the campaign | You can use the following code to print out all of the properties in the [[Campaign:campaign properties|campaign properties]] list.. | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
Campaign Properties<br> | Campaign Properties<br> |
Revision as of 13:57, 1 December 2008
Function getAllPropertyNames
Note: This refers to a proposed change that has not been implemented in the main code base yet.
Gets a string list containing the the token property names that are defined in the campaign properties.
Usage
[h: player = getAllPropertyNames()]
[h: player = getAllPropertyNames(type)]
[h: player = getAllPropertyNames(type, delim)]
If type is specified then the string list contains the [[Token:token property|property] names for that token property type, otherwise it will contain the token property names for all token property types. If delim is specified then it is used to separate the values in the string list, if it is not specified then it defaults to ','.
Examples
You can use the following code to print out all of the properties in the campaign properties list..
Campaign Properties<br>
[h: props = getAllPropertyNames()]
[foreach(name, props, "<br>"): name]