getStrProp: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Added version.) |
Verisimilar (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
getStrProp(propList, key) | getStrProp(propList, key) | ||
</source> | </source> | ||
<source lang="mtmacro" line> | |||
getStrProp(propList, key, error) | |||
</source> | |||
'''Parameters''' | |||
{{param|proplist|}} | |||
{{param|key|}} | |||
{{param|error|Returned if the key in not found.}} | |||
|example= | |example= | ||
Line 17: | Line 24: | ||
</source> | </source> | ||
Returns {{code|longsword}}. | Returns {{code|longsword}}. | ||
|changes= | |||
{{change|1.3b43|Added the optional error parameter.}} | |||
}} | }} | ||
[[Category:String Property List Function]] | [[Category:String Property List Function]] |
Revision as of 11:18, 10 March 2009
getStrProp() Function
• Introduced in version 1.3b42
Returns the value associated with a key from the specified string property list.
Usage
getStrProp(propList, key)
getStrProp(propList, key, error)
Parameters
proplist
-key
-error
- Returned if the key in not found.
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
.
Version Changes
- 1.3b43 - Added the optional error parameter.