previous_object

ds2.1.1/lib/doc/efun/all/previous_object · 734 B

From the archive ds2.1.1.zip

Download the archive   « Back to the archive contents

previous_object - returns the object(s) that called the current function

object previous_object(); 
mixed previous_object(int x); 

Returns an object pointer to the object, if any, that called current function.
Note that local function calls do not set previous_object() to the current
object, but leave it unchanged.  If passed a positive integer, it goes back
the given number of previous objects in the calling chain.
previous_object(0) is the same as previous_object(), previous_object(1) is
the previous object's previous_object(), etc.  previous_object(-1) returns
an array containing all of the previous objects.

See also:
 call_other,
 call_out,
 origin

 Tim Hollebeek  Beek@ZorkMUD, Lima Bean, IdeaExchange, and elsewhere

Site Stats

Snippets: 1791
Codebases: 571