[CODE] [NEWBIE] Same question about romance, but some more info.

From: RHS Linux User (carnage@games2.mudsrus.com)
Date: 12/29/98


Alright nevermind the other message, I figured out what I did wrong right
after I posted.  Sorry bout that.:>

Anywayz, I added this to char_file_u in structs.h, this took care of my
last problem:
   int romance;     //Romance Values
   char partner[MAX_NAME_LENGTH+1];                // Partner Values

And in DB.c to make it save this value I did this:
  st->romance = ROMANCE(ch);
 if (PARTNER(ch)) {
    strcpy(st->partner, PARTNER(ch));
 }

Now also in DB.c I did this so it would load the values back in on reboot,
now when I patched this stuff in it was set so romance got a value of 0
and partner was set to NULL everytime a charactor logged on so since I
want this to be something that is saved and reload everytime a player
reconnects so if someone was married last time they were on they still are
I did this in store_to_char:
  ch->player.romance = st->romance;
if((st->partner) > 0) {
  ch->player.partner = st->partner;
   }

NOw I tried the last part before like this:
strcpy(ch->player.partner, st->partner);
How ever when it was done like this the mud would crash everytime a player
logged on.
The way I'm currently using it, the system works, but once the couple
rents and comes back on it says their dating .  I figure that this means
that either I'm not sving the right stuff to the file or its not loading
the data properly.  Any ideas?:>  Laterz.

-Smillie, IMP
MAximum Carnage
Carnage.mudsrus.com 6669


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST