type2
Description
Similar to the built-in type
function, but type2
is designed to identify DSL-specific userdata types. Userdata returned from C can represent a wide range of values such as pointers, C data types, textures, scripts, time cycles, and many more type of values. This function can recognize those DSL specific userdata. If the value is not a DSL userdata, the default type function is used.
function type2(value) --[[ ... ]] end
Parameters
value
: nil, number, string, function, CFunction, userdata, or table
Return Values
valueType
: string
Example
local Userdata = CreateTexture('box.png')
local Type = type2(Userdata) --> texture