getMarkerType
Client-side
Server-side
Shared
Pair: setMarkerType
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function returns a marker's type.
OOP Syntax Help! I don't understand this!
- Method:marker:getMarkerType(...)
- Variable: .markerType
Syntax
string getMarkerType ( marker theMarker )Required Arguments
- theMarker: A marker element referencing the specified marker.
Returns
- string: value
If an invalid marker is specified, false is returned.
Code Examples
shared
This function creates a default marker at a given position and outputs its type.
function createMarkerAndOutputType ( ... ) -- we create the marker. local theMarker = createMarker ( ... ) -- if the marker was created. if isElement ( theMarker ) then -- then get its type. local markerType = getMarkerType ( theMarker ) -- and output it. return outputChatBox ( "It's a " .. markerType .. " marker!" ) endend
-- Create a marker and show its type in chat.createMarkerAndOutputType(0, 0, 2, "cylinder", 2)