SYNOPSIS
unknown call_other(object ob, string str, mixed arg, ...)
ob->fun(mixed arg, ...)
DESCRIPTION
Call a member function in another object with an argument. The
return value is returned from the other object. The object can
be given directly or via a string (i.e. its file_name). If it
is given by a string and the object does not exist yet, it
will be loaded.
ob->fun(args) and "ob_name"->fun(args) is equivalent to
call_other(ob, "fun", args). Nowadays the ob_name string can
also be a variable.
If ob does not define a publicly accessible function of the
specified name, call_other() will return 0, which
indistinguishable from a function returning 0.
Since the type of the returned value is unknown by the
compiler, you must cast it, if you're LPC code uses
prototypes.
EXAMPLES
string str;
str = (string)this_player()->QueryProp(P_SHORT);
You have to do explicit type casting because of the unknown
return type.
call_other("/players/wizard/thing", "???", 0);
This looks a bit weird but it is used very often to just load
the object by calling a not existing function like "???".
(Thus there is no efun load(string ob_name)).
SEE ALSO
function_exists(E), call_resolved(E), create(E)