setStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=setStrProp
|name=setStrProp
|version=1.3b42
|description=
|description=
Returns a [[Macros:string property list|string property list]] with the key set to the value passed in.  
Returns a [[Macros:string property list|string property list]] with the key set to the value passed in.  
Line 6: Line 7:
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: props = setStrProp(propList, key, value)]
setStrProp(propList, key, value)
</source>
</source>



Revision as of 11:06, 10 March 2009

setStrProp() Function

Introduced in version 1.3b42
Returns a string property list with the key set to the value passed in.

Usage

setStrProp(propList, key, value)

Example

[h: weapon = "name=longsword; damage=1d8; maxdamage=8"]
[h: weapon = setStrProp(weapon, "value", 10)]
Returns "longsword".