Garry's Mod Wiki

Concepts - Any Type

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 )