GetObject: Difference between revisions

From VisionaireWiki
Jump to navigation Jump to search
(New page: ==getObject== Lua Syntax: <pre>getObject(path_or_tuple)</pre> ===Arguments=== ====path_or_tuple==== :'''"string"''' - Path to a Visionaire Object. The path has to start with a table name...)
 
m (Bot (Edward's framework))
 
Line 3: Line 3:


Lua Syntax:
Lua Syntax:
<pre>getObject(path_or_tuple)</pre>
<pre>getObject(path_or_tuple [, logWarning])</pre>
===Arguments===
===Arguments===
====path_or_tuple====
====path_or_tuple====
:'''"string"''' - Path to a Visionaire Object. The path has to start with a table name, then follows the object name in brackets ('[',']') - only the game table does not have an object name. Optionally a field name (field type must either be t_link or t_links) can follow after a dot '.'. For t_links fields you must specify an object name in brackets ('[',']'). For t_link fields there are no brackets. Alternatively you can also pass in a tuple with the table id and the object id, e.g. "(0,3)".
:'''"string"''' - Path to a Visionaire Object. The path has to start with a table name, then follows the object name in brackets ('[',']') - only the game table does not have an object name. Optionally a field name (field type must either be t_link or t_links) can follow after a dot '.'. For t_links fields you must specify an object name in brackets ('[',']'). For t_link fields there are no brackets. Alternatively you can also pass in a tuple with the table id and the object id, e.g. "(0,3)".
====logWarning====
:'''true|false''' - If true (default) a warning will be printed to the log file if the object could not be found.
===Flags===
===Flags===
===Return Values===
===Return Values===
;visionaireObject
;visionaireObject
:The found visionaire object or an empty object if no object was found.
:The found visionaire object or an empty object if no object was found.

Latest revision as of 03:15, 2 May 2010

getObject

Lua Syntax:

getObject(path_or_tuple [, logWarning])

Arguments

path_or_tuple

"string" - Path to a Visionaire Object. The path has to start with a table name, then follows the object name in brackets ('[',']') - only the game table does not have an object name. Optionally a field name (field type must either be t_link or t_links) can follow after a dot '.'. For t_links fields you must specify an object name in brackets ('[',']'). For t_link fields there are no brackets. Alternatively you can also pass in a tuple with the table id and the object id, e.g. "(0,3)".

logWarning

true|false - If true (default) a warning will be printed to the log file if the object could not be found.

Flags

Return Values

visionaireObject
The found visionaire object or an empty object if no object was found.