getStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function getStrProp== Returns the value associated with a key from the specified Macros:string property list. ==Usage== <source lang="mtmacro" line> [h: macros = getStrProp(propL...)
 
No edit summary
Line 5: Line 5:
==Usage==
==Usage==
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: macros = getStrProp(propList, key)]
[h: props = getStrProp(propList, key)]
</source>
</source>



Revision as of 15:33, 13 December 2008

Function getStrProp

Returns the value associated with a key from the specified string property list.

Usage

[h: props = getStrProp(propList, key)]


Examples

To get the name from a weapon string property list

[h: weapon = "name=longsword; damage=1d8; maxdamage=8"]
Name of Weapon = [r: getStrProp(weapon, "name"]

Returns "longsword".