Quote:
Originally Posted by MrOmega
It equals -1 (sort of) when you test for a player or npc and it comes back null, since players can have an id of 0.
|
That's a different matter though. 0 doesn't equal -1 "sort of"

Because those functions returns an index it would be logical to return -1 for not found, since 0 is the index for the first member.
You'll just have to adapt and use those functions the same way as you use obj.type().