self:get_type

Shared

Retrieves the type name of the instance


Syntax

local result = self:get_type()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
string | boolresultType of the instance, false if unavailable

Examples

Get the type of a thread instance
local entity = util.thread.create(function(self)
    self:sleep(2000)
end)

entity:resume()
core.engine.print("info", self:get_type()) -- 'thread'

On this page