Determines what type the object is.
- The object to find its type.
Returns the object type (OBJECT_TYPE_*) of oTarget and 0 if the object is invalid or there is no defined constant (see Known Bugs).
Returns OBJECT_TYPE_ALL or OBJECT_TYPE_INVALID (both are the same value) for sound objects.
Returns 0 for areas or modules (no constant defined/"invalid"). These can also be tested with GetArea, using code similar to: if(GetArea(oObject) == oObject)
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 is always 0.
Sound objects return OBJECT_TYPE_INVALID / OBJECT_TYPE_ALL and Area and Modules have no defined return value thus return 0 (see Remarks above).
author: Tom Cassiotis, editor: Charles Feduke, additional contributor(s): Sunjammer