Try this
Define tsex as the following
char tsex[MSL];
Try this code
switch (ch->sex)
{
case 1: tsex = "his"; break;
case 2: tsex = "her"; break;
default: tsex = "it's"; break;
}
sprintf (buf, "{G[Global]:{x{C%s {Rhas completed %s quest to
slay {D%s{R!{x",ch->name,tsex,ch->pcdata->tmpbuf);
do_function(ch, &do_echo, buf );
Im sure there is another way of determining sex.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 10, 2003 4:50 PM
> To: [email protected]
> Subject: problem with 3 if statments.
>
>
> Hey list, got a new problem. In the quest function, under
> the "complete" argument check, I have this set of checks for
> completing a quest to slay a mob.
>
>
>
> /* ch->pcdata->tmpbuf is the questmobs short desc.*/
> /* based on characters sex, male = 1, female = 2, */
> /* it = 0. */
> if (ch->sex == 1);
> {
> sprintf (buf, "{G[Global]:{x{C%s {Rhas completed his
> quest to slay {D%s{R!{x",ch->name, ch->pcdata->tmpbuf);
> do_function(ch, &do_echo, buf );
> }
> if (ch->sex == 2);
> {
> sprintf (buf, "{G[Global]:{x{C%s {Rhas completed her
> quest to slay {D%s{R!{x",ch->name, ch->pcdata->tmpbuf);
> do_function(ch, &do_echo, buf );
> }
> if (ch->sex == 0);
> {
> sprintf (buf, "{G[Global]:{x{C%s {Rhas completed its
> quest to slay {D%s{R!{x",ch->name, ch->pcdata->tmpbuf);
> do_function(ch, &do_echo, buf );
> }
>
>
> this is what i get when i type quest complete
>
> [<12200/12200hp 30345/31305m 1232/1404mv> <1000>] quest complete
> You inform the Questor you have completed her quest.
> the Questor says 'Congratulations on completing your quest!'
> the Questor says 'As a reward, I am giving you 35 quest
> points, and 144 gold.'
> global> [Global]:Atm has completed his quest to slay the
> elite gargoyle!
> global> [Global]:Atm has completed her quest to slay the
> elite gargoyle!
> global> [Global]:Atm has completed its quest to slay the
> elite gargoyle!
>
>
> thanks for any help :)
>
> __________________________________________________________________
> McAfee VirusScan Online from the Netscape Network.
> Comprehensive protection for your entire computer. Get your
> free trial today!
> http://channels.netscape.com/ns/computing/mcafee/index.jsp?pro
mo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom