MongooseA text-based world full of questionable inventions.

All help topics · Link to this topic

Showing help on 'add_property()'

Syntax: add_property (OBJ <object>, STR <prop-name>, <value>, LIST <info>) => none

Defines a new property on the given <object>, inherited by all of its descendants; the property is named <prop-name>, its initial value is <value>, and its owner and initial permission bits are given by <info> in the same format as is returned by property_info(). The object argument must be a permanent object; anonymous objects cannot have new properties added directly to them.

If <object> is not a permanent object, then E_TYPE is raised. If <object> is not valid or <object> already has a property named <prop-name> or <info> does not specify a legitimate owner and permission bits, then E_INVARG is raised. If the programmer does not have write permission on <object> or if the owner specified by <info> is not the programmer and the programmer is not a wizard, then E_PERM is raised.