Garry's Mod Wiki

Revision Difference

Global.TypeID#562048

<function name="TypeID" parent="Global" type="libraryfunc"> <description> Gets the associated type ID of the variable. Unlike <page>Global.type</page>, this does not work with <page>no value</page> - an argument must be provided. <warning>This will return `TYPE_TABLE` for <page>Color</page> objects.</warning> <warning>This will return `TYPE_STRING` for <page>vararg</page> objects.</warning>⤶ <bug request="1120">This returns garbage for _LOADLIB objects.</bug> <bug request="1459">This returns `TYPE_NIL` for <page>proto</page>s.</bug> </description> <realm>Shared</realm> <args> <arg name="variable" type="any">The variable to get the type ID of.</arg> </args> <rets> <ret name="" type="number">The type ID of the variable. See the <page>Enums/TYPE</page>.</ret> </rets> </function>