GetElementByID: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 16: Line 16:


==Example==  
==Example==  
This example does...
This example finds
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- Assuming an element with the id 'offense exists' i.e. <team1 id="offense">
-- Assuming an element with the id 'offense' exists (i.e. <team1 id="offense">), get it's element
offenseElement = getElementByID ( "offense" )
offenseElement = getElementByID ( "offense" )
</syntaxhighlight>
</syntaxhighlight>

Revision as of 08:11, 26 May 2006


This fake function is for use with blah & blah and does blahblahblabhalbhl

Syntax

element getElementByID ( string id )  

Required Arguments

  • id: The ID of the element as it appears in the xml file.

Returns

Returns the element with the given ID, or false if no such element exists.

Example

This example finds

-- Assuming an element with the id 'offense' exists (i.e. <team1 id="offense">), get it's element
offenseElement = getElementByID ( "offense" )

See Also

Template:FunctionArea Functions