Global/TypeID

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Type->type)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Function
+
{{Func
| Name = TypeID
+
|Name=TypeID
| Namespace = [[Global]]
+
|Parent=Global
| Realm = Shared
+
|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.
}}
+
  
{{Syntax
+
{{Bug|Request=1120|This returns garbage for _LOADLIB objects.}}
| Name = TypeID
+
{{Bug|Request=1459|This returns TYPE_NIL for {{Type|proto}}s.}}
| Description = Gets the associated type id of the variable, see {{EnumLink|TYPE}}.
+
|Realm=Shared
| Returns = {{Return|string|type id of the variable}}
+
|IsClass=No
 
+
}}
| Arg1Name = variable
+
{{Arg
| Arg1Type = any
+
|type=any
| Arg1Req = true
+
|name=variable
| Arg1Desc = 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