getLibProperty: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==Function getLibProperty==
{{MacroFunction
|name=getLibProperty
|description=Returns the value of a [[Token:token property{{!}}token property]] from a [[Token:library token{{!}}library token]]. If the lib argument is not specified then the [[Token:token property{{!}}token property]] will be retrieved from the [[Token:library token{{!}}library token]] that the macro is currently running from.


 
|usage=
Returns the value of a [[Token:token property|token property]] from a [[Token:library token|library token]]. If the lib argument is not specified then the [[Token:token property|token property]] will be retrieved from the [[Token:library token|library token]] that the macro is currently running from.
 
===Usage===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: val = getLibProperty(name)]
[h: val = getLibProperty(name)]
Line 10: Line 9:
</source>
</source>


===Examples===
|examples=
To get the "init" [[Token:token property|token property]] from the [[Token:library token|library token]] that a macro is running from use.
To get the "init" [[Token:token property{{!}}token property]] from the [[Token:library token{{!}}library token]] that a macro is running from use.
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[getLibProperty("init")]
[getLibProperty("init")]
</source>
</source>


To get the "init" [[Token:token property|token property]] from a [[Token:library token|library token]] called "lib:Attacks" use.
To get the "init" [[Token:token property{{!}}token property]] from a [[Token:library token{{!}}library token]] called "lib:Attacks" use.
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[getLibProperty("init", "lib:Attacks")]
[getLibProperty("init", "lib:Attacks")]
</source>
</source>
}}
[[Category:Token Library Function]]

Revision as of 03:51, 7 March 2009

getLibProperty() Function

Returns the value of a token property from a library token. If the lib argument is not specified then the token property will be retrieved from the library token that the macro is currently running from.

Usage

[h: val = getLibProperty(name)]
[h: val = getLibProperty(name, lib)]

Examples

To get the "init" token property from the library token that a macro is running from use.
[getLibProperty("init")]

To get the "init" token property from a library token called "lib:Attacks" use.

[getLibProperty("init", "lib:Attacks")]