GetObjectType(object)

Determines what type the object is.

int GetObjectType(
    object oTarget
);

Parameters

oTarget

The object to find its type.


Description

Returns the object type (OBJECT_TYPE_*) of oTarget and 0 if oTarget is not a valid object.



Known Bugs

This function doesn't return -1 on error as it claims in the function's description in the Script Editor. Nor does it return OBJECT_TYPE_INVALID for invalid objects. Return value on error was, in my testing, always 0.


Version

1.61

See Also

categories: Get Data from Object Functions
constants: OBJECT_TYPE_* Constants


 author: Tom Cassiotis, editor: Charles Feduke, additional contributor(s): Sunjammer