[DGD] save_object()

Felix A. Croes felix at dworkin.nl
Wed Jan 15 03:11:44 CET 2003


"Jamin Vander Berg" <jaminv at softhome.net> wrote:

> The function save_object() does not seem to be working for me, and seems =
> ill-documented, so I'm not sure if I'm calling it right.
>
> I have a player object linked to my user object and the player object =
> inherits living, which holds all the *stats* for a living object. =
> Obviously, when saving a user, I would like to save the player object =
> along side of it, but this does not seem to be working.
>
> When I call:
>
> player->save_object(SYSTEM_USER_DIR + "/" + name);
>
> nothing happens. No file is created, no error is given. Nothing happens. =
> For the record, this is called from inside the system user object =
> ("/usr/System/obj/user.c") which has access to the SYSTEM_USER_DIR, =
> obviously, as it saves the user object just fine.

You cannot call kfuns from outside an object.  In the kernel library (and
other mudlibs), save_object() is redefined by a static function in the
auto object.  You cannot call static functions from outside an object,
either.

Finally, whether or not the player object is able to save in the System
directory depends solely on the access of the player object itself, not
on the access of the caller.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list