Global/TypeID

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Bug)
(Note about no value)
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=1120|This returns garbage for _LOADLIB objects.}}

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