Garry's Mod Wiki

Garry's Mod Wiki

Any (Data) Type

"Any" type values are values who have some valid Type. They might be Numbers, Strings, Players or any other data type.

The only things that do not fall under the label of "Any Type" are values of type nil.

Example

You can check if a variable is of Any Type by detected by checking the value's Type against the string "nil"

-- Assume that the variable `suspiciousData` contains a "nil" type value local isDataAnyType = type( suspiciousData ) ~= "nil" -- Prints: false print( isDataAnyType )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...