getStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 26: Line 26:


|changes=
|changes=
{{change|1.3b43|Added the optional error parameter.}}
{{change|1.3b43|Added the optional {{code|error}} parameter.}}


}}
}}
[[Category:String Property List Function]]
[[Category:String Property List Function]]

Revision as of 11:19, 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
[h: weapon = "name=longsword; damage=1d8; maxdamage=8"]
Name of Weapon = [r: getStrProp(weapon, "name")]
Returns longsword.


Version Changes

  • 1.3b43 - Added the optional error parameter.