Thread: Debunking null
View Single Post
  #8  
Old 01-25-2011, 09:39 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by MrOmega View Post
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().
__________________
Reply With Quote