Global/TypeID

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Type->type)
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|Name=TypeID
 
|Name=TypeID
 
|Parent=Global
 
|Parent=Global
|Description=Gets the associated type id of the variable.
+
|Description=Gets the associated type ID of the variable. Unlike {{GlobalFunction|type}}, this does not work with {{Type|no value}} - an argument must be provided.
 +
 
 +
{{Bug|Request=1120|This returns garbage for _LOADLIB objects.}}
 +
{{Bug|Request=1459|This returns TYPE_NIL for {{Type|proto}}s.}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=No
 
|IsClass=No
Line 9: Line 12:
 
|type=any
 
|type=any
 
|name=variable
 
|name=variable
|desc=The variable to get the type id of.
+
|desc=The variable to get the type ID of.
 +
}}
 +
{{Ret
 +
|type=number
 +
|desc=The type ID of the variable. See the {{Enum|TYPE}}.
 
}}
 
}}

Latest revision as of 12:16, 11 December 2019

 TypeID( )

Description

Gets the associated type ID of the variable. Unlike type, this does not work with no value - an argument must be provided.

BUG

This returns garbage for _LOADLIB objects.

Request Tracker: #1120

BUG

This returns TYPE_NIL for protos.

Request Tracker: #1459

Arguments

any variable

The variable to get the type ID of.

Returns

number

The type ID of the variable. See the TYPE_ Enums.
Personal tools
Navigation