Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ ROM
➜ Compiling the server
➜ Adding a Sayto snippet
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| LunaticStriker
USA (17 posts) Bio
|
Date
| Wed 24 Aug 2005 10:52 PM (UTC) |
Message
| Alright my main promblem is not a compile error but a usage promblem.
void do_sayto(CHAR_DATA *ch, char *argument)
{
char arg[MAX_INPUT_LENGTH];/*, buf[MAX_STRING_LENGTH]*/
CHAR_DATA *victim;
argument = one_argument (argument, arg);
if (arg[0] == '\0' || argument[0] == '\0')
{
send_to_char ("Say what to whom?\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL ||
victim->in_room != ch->in_room )
{
send_to_char ("They are not here.\n\r",ch);
return;
}
else
{
act ("""You say to $N '""$t"
"'{x", ch, argument, victim, TO_CHAR);
act_new ("""$n says to you '""$t"
"'{x", ch, argument, victim, TO_VICT, POS_DEAD);
act_new ("""$n says to $N '""$t"
"'{x", ch, argument, victim, TO_ROOM, POS_DEAD);
}
The promblem being that it sends the message "Blah says to you 'poo'" and "Blah says to Blah2 'poo'".
I just want it to send to the victim the "Blah says to you 'poo'" portion and hide the "Blah says to Blah2 'poo'".
But I still want the room to see the message just not have it show up on the victims screen since he already gets the message.
Please help me! | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Wed 24 Aug 2005 11:09 PM (UTC) |
Message
| So it's sending two messages to the victim? Try changing TO_ROOM to TO_NOTVICT, that should fix it, but that's in Smaug. It may not work. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| LunaticStriker
USA (17 posts) Bio
|
Date
| Reply #2 on Thu 25 Aug 2005 01:23 AM (UTC) |
Message
| Ya, I am using ROM 2.4b6 but I will try that anyhow maybe I will get lucky. | Top |
|
Posted by
| LunaticStriker
USA (17 posts) Bio
|
Date
| Reply #3 on Thu 25 Aug 2005 01:30 AM (UTC) Amended on Thu 25 Aug 2005 01:31 AM (UTC) by LunaticStriker
|
Message
| Freaking awesome! it worked! Thank you so much!
Completed ROM 2.4b6 stock do_sayto Snippet:
void do_sayto(CHAR_DATA *ch, char *argument)
{
char arg[MAX_INPUT_LENGTH];/*, buf[MAX_STRING_LENGTH]*/
CHAR_DATA *victim;
argument = one_argument (argument, arg);
if (arg[0] == '\0' || argument[0] == '\0')
{
send_to_char ("Say what to whom?\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL ||
victim->in_room != ch->in_room )
{
send_to_char ("They are not here.\n\r",ch);
return;
}
else
{
act ("""You say to $N '""$t"
"'{x", ch, argument, victim, TO_CHAR);
act_new ("""$n says to you '""$t"
"'{x", ch, argument, victim, TO_VICT, POS_DEAD);
act_new ("""$n says to $N '""$t"
"'{x", ch, argument, victim, TO_NOTVICT, POS_DEAD);
}
| Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,455 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top