Hasattr(): Difference between revisions

From TinyMUX
Jump to navigation Jump to search
New page: Category:Functions {{Function|hasattr(<object>, <attribute name>)}} Returns 1 if the object has the named attribute, and 0 if it does not. If the object does not exist or the player ...
 
(No difference)

Latest revision as of 07:33, 28 November 2010


hasattr(<object>, <attribute name>)

Returns 1 if the object has the named attribute, and 0 if it does not. If the object does not exist or the player does not have the ability to examine the object, #-1 will be returned.

Hasattr() doesn't check for attributes inherited from parent objects. Use hasattrp() for that.