MongooseWhere programmers kick back and build silly things together.

All help topics · Link to this topic

Showing help on 'add_verb()'

Syntax: add_verb (OBJ <object>, LIST <info>, LIST <args>) => INT

Defines a new verb on the given <object>. The new verb's owner, permission bits and name(s) are given by <info> in the same format as is returned by verb_info(). The new verb's direct-object, preposition, and indirect-object specifications are given by <args> in the same format as is returned by verb_args(). The new verb initially has the empty program associated with it; this program does nothing but return an unspecified value. The object argument must be a permanent object; anonymous objects cannot have new verbs added directly to them. On success, the returned integer is the one-based number of the new verb on <object>.

If <object> is not a permanent object, then E_TYPE is raised. If <object> is not valid, or <info> does not specify a legitimate owner and permission bits, or <args> is not a legitimate syntax specification, 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.