DgsGetType: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (DGS (OOP Syntax)/(Template Organization) Mission)
m (DGS OOP Syntax changing)
 
Line 7: Line 7:
string dgsGetType ( mixed theMixed )   
string dgsGetType ( mixed theMixed )   
</syntaxhighlight>
</syntaxhighlight>
{{DGS/OOP||DGSElement:getType}}
{{DGS/OOP|
    Method = DGSElement:getType
}}


===Required Arguments===  
===Required Arguments===  

Latest revision as of 19:04, 3 May 2021

This function is used to retrieve the type of a dgs element, an element even a string/number/bool value.

Syntax

string dgsGetType ( mixed theMixed )  

DGS OOP Syntax Help! I don't understand this!

Method: DGSElement:getType(...)

Required Arguments

  • theMixed: What you wish to get the type of.

Returns

Returns a string containing the type, false if invalid arguments were passed.

Example

DGS = exports.dgs

label = DGS:dgsCreateLabel(100,100,200,50,"Test Label",false)
outputChatBox(DGS:dgsGetType(label)) -- returns "dgs-dxlabel"

outputChatBox(DGS:dgsGetType("str")) -- returns "string"

See Also

General Functions

General Events