Hmm.. tried this code.. and it prints out great. But it only sends to the
person designated as (ch). Not as a global announcement. Any ideas?
I used the following :
sprintf(buf, "{c[{RARENA{c] Let is be known that {C%s {chas defeated {C%s
{cin mortal combat.", PERS(ch, ch), PERS(victim, ch));
act_new(buf, ch, NULL, NULL, TO_ALL, POS_DEAD);
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jason
Gauthier
Sent: Tuesday, December 04, 2001 7:13 PM
To: 'Jef Waite'; [email protected]
Subject: RE: Announcment Syntax for multiple variables
ack! bad :)
> sprintf(buf, "[Announcement by $n] Player %s and Player %s have done
> something", victim1->name, victim2->name);
>
> act_new(buf, ch, NULL, NULL, TO_ALL, POS_DEAD);
>
> Other than that, I'm not sure what you're trying to do...
You should never dereference '->name' directly unless it's an immortal.
If you do, your players lose the benefits of invisibility and blindness.
If you have to refer to a player, and act won't cut it, use PERS.
----------------------
sprintf(buf, "[Announcement] Player %s and Player %s have done
something", PERS(victim, ch), PERS(victim2, ch));
act_new(buf, ch, NULL, NULL, TO_ALL, POS_DEAD);
------------------------
I know it was just sample code, but implies bad practice :)
Jason, who has a 60 line PERS() function.
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com