setStrProp: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function setStrProp== Returns a[Macros:string property list|string property list]] with the key set to the value passed in. ==Usage== <source lang="mtmacro" line> [h: props = setStrPr...) |
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=setStrProp | |||
|description= | |||
Returns a [[Macros:string property list|string property list]] with the key set to the value passed in. | |||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: props = setStrProp(propList, key, value)] | [h: props = setStrProp(propList, key, value)] | ||
</source> | </source> | ||
|example= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: weapon = "name=longsword; damage=1d8; maxdamage=8"] | [h: weapon = "name=longsword; damage=1d8; maxdamage=8"] | ||
Line 15: | Line 15: | ||
</source> | </source> | ||
Returns "longsword". | Returns "longsword". | ||
}} | |||
[[Category:String Property List Function]] |
Revision as of 04:40, 9 March 2009
setStrProp() Function
Returns a string property list with the key set to the value passed in.
Usage
[h: props = setStrProp(propList, key, value)]
Example
[h: weapon = "name=longsword; damage=1d8; maxdamage=8"]
[h: weapon = setStrProp(weapon, "value", 10)]