... replace CHAR_DATA spouse; with CHAR_DATA *spouse so you can actually
    do "if (ch->pcdata->spouse!=NULL)" as a real test :-)
-- Was done before the email was sent out, that was my bad there.. 
... check that you proper initialize spouse in new_pc_data() ... 
-- new_pc_data()??? According to grep and other tools, new_pc_data just
don't exist here.
(damned,this start to sound like somebody who never did any C
programming). ... 
-- Actually, this was put in from a snip, something I probably never
should have done, but it   worked for what it was supposed to be at the
time.. 
compile your stuff with -Wall, because I think your assignments should
    be complained about:
    > victim->pcdata->tspouse = ch->name ;
    > ch->pcdata->tspouse = victim->name ;
Tspouse is a temp pointer, so I did throw that in as a char arg.. I'm
getting no complaints from the code there..  The pointers to
ch->pcdata->spouse, I simply put in as victim.. That solved any
complaints from there as well. However, the following is STILl giving me
compile warnings.
elationship.c: In function `do_askout':
relationship.c:76: warning: char format, CHAR_DATA arg (arg 3)
sprintf(buf,"I don't think %s would like that very
much\n\r",ch->pcdata->spouse); //line 76
relationship.c:82: warning: char format, CHAR_DATA arg (arg 3)
sprintf(buf,"I don't think %s would like that very much\n\r",
ch->pcdata->spouse);// line 82
relationship.c: In function `do_spousetalk':
relationship.c:435: warning: char format, CHAR_DATA arg (arg 3)
      sprintf( buf, "You say to %s, '%s'\n\r", ch->pcdata->spouse,
argument ); //line 435
relationship.c: In function `do_breakup':
relationship.c:505: warning: char format, CHAR_DATA arg (arg 3)
sprintf (buf, "You break up with %s\n\r", ch->pcdata->spouse); // line
505
relationship.c:524: warning: char format, CHAR_DATA arg (arg 3)
sprintf(buf, "%s has broken up with you\n\r",ch->name); // 524
save.c: In function `fwrite_char':
save.c:490: warning: char format, CHAR_DATA arg (arg 3)
       fprintf(fp, "Spou %s~\n", ch->pcdata->spouse);//490
save.c: In function `fread_char':  
save.c:1882: warning: assignment from incompatible pointer type
KEY( "Spou",        ch->pcdata->spouse,     fread_word( fp ));         



So, if %s isn't the variable that I SHOULD be using , which should I be
using?? It seems like it is the one that makes the most sense to me.
Pardon the ignorance, but, I don't exactly know everything about C like
some do. I'm more learning things as I go..

If %s IS the variable that I should be using, then why the compile
errors?



Reply via email to