getStrProp: Difference between revisions
Jump to navigation
Jump to search
m (Missing a )) |
Verisimilar (talk | contribs) (Applied Template:MacroFunction) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=getStrProp | |||
|description= | |||
Returns the value associated with a key from the specified [[Macros:string property list|string property list]]. | Returns the value associated with a key from the specified [[Macros:string property list|string property list]]. | ||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: props = getStrProp(propList, key)] | [h: props = getStrProp(propList, key)] | ||
</source> | </source> | ||
|example= | |||
To get the name from a weapon [[Macros:string property list|string property list]] | To get the name from a weapon [[Macros:string property list|string property list]] | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
Line 15: | Line 15: | ||
Name of Weapon = [r: getStrProp(weapon, "name")] | Name of Weapon = [r: getStrProp(weapon, "name")] | ||
</source> | </source> | ||
Returns | Returns {{code|longsword}}. | ||
}} | |||
[[Category:String Property List Function]] |
Revision as of 04:00, 8 March 2009
getStrProp() Function
Returns the value associated with a key from the specified string property list.
Usage
[h: props = getStrProp(propList, key)]
Example
To get the name from a weapon string property list
Returns
[h: weapon = "name=longsword; damage=1d8; maxdamage=8"]
Name of Weapon = [r: getStrProp(weapon, "name")]
longsword
.