[DGD]DGD and Melville

Nightlith nightlith at mb.sympatico.ca
Sun Jan 14 16:51:33 CET 2001


> By call_other. You have the reference to the player, so you
> can do
>   player->set_my_stats() ;
>
> to invoke the function set_my_stats() in the player object.
> You have to be sure you are pointing at the correct player
> object, and player.c usually wants some security to make
> sure the object that invoked the function is the matching
> user object.
>
> > What I have going is user.c having both login.c (to create/restore
> > a user) and creation.c (to create/restore the player). player.c inherits
> > living.c and creation.c is inherited after login.c. If I have player
> > declared in login, creation.c complains, and vice versa. Obviously, I
don't
> > know what I'm doing :-)
>
> It sounds to me like login.c should be inherited by user.c, not
> by player.c. What error message do you get when it "complains"?

user.c inherits login.c like always. But I want to also inherit creation.c
so after a new user is created, it moves on to creating the player.
creation.c only has the functions neccessary to create a new player and
that's it. player.c inherits living.c and both have all the stat accessor
functions. Obviously creation.c needs access to those functions, so I
thought by putting creation.c in user.c after login.c, it would have access
to the cloned player object at login. I was wrong, and the error is simply
an undifined variable error (a variable set in player.c).
If that makes sense, great. But I haven't slept in 36+ hrs...so I'm kinda
out of my mind at the moment. :-)

Dereck.



List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list