/doc/efun/exec


SYNOPSIS

object exec(object new, object old)

DESCRIPTION

exec() switches the connection from the interactive object old to the object new. If the new object is also interactive, it's connection will be transferred to the old object, thus exchaning the two connections between the object. If the new object is not interactive, the old will not be interactive anymore after the exec call succeeded. It is used to load different "user objects" or to reconnect link dead users.

To provide security mechanisms, the interpreter calls master->valid_exec(current_program, new, old), which must return anything other than 0 to allow this exec() invocation.

After the exec(), if arg 2 was this_player(), this_player() becomes arg 1, else vice versa.

EXAMPLE

	ob = clone_object("std/player");
	exec(ob, this_object());
	destruct(this_object());

SEE ALSO

connect
disconnect
interactive

| Home | Applied | Concepts | Efuns | Help | Intro | Lib | LPC | Prop | Obj | Sefuns | Std | W |

Nightfall@quest.tat.physik.uni-tuebingen.de
Automatically generated on Don, 11. Apr 1996