I am trying to add the info channel system and it's coming along great except
for this small thing. I can't seem to figure it out...
I'll paste what is going on when it works, then I will paste in some code.
<69hp 118m 302mv> infoc
Info channel is now ON.
'what the gay
You say 'what the....'
The sky is getting cloudy.
infoc
Info channel is now OFF.
<76hp 120m 328mv>
As you can see my prompt went away. This is the only time it happens.
Here is my code...
void do_infochan(CHAR_DATA * ch, char * argument)
{
if (IS_SET(ch->comm,COMM_NOINFO))
{
send_to_char("Info channel is now ON.\n\r",ch);
REMOVE_BIT(ch->comm,COMM_NOINFO);
}
else
{
send_to_char("Info channel is now OFF.\n\r",ch);
SET_BIT(ch->comm,COMM_NOINFO);
}
}
I think that is where is causing the problem. I don't know why it would get
rid of the prompt since I just copied the other ones.
I have comm_noinfo defined in merc.h as..
#define COMM_NOINFO (N)
under
/* RT comm flags -- may be used on both mobs and chars */.
Here is my info code:
void info( CHAR_DATA * ch, int level, char * message, ...)
{
char buf[MAX_STRING_LENGTH];
DESCRIPTOR_DATA * d;
va_list args;
va_start(args,message);
vsnprintf(buf, MAX_STRING_LENGTH, message, args);
va_end(args);
for ( d = descriptor_list; d; d = d->next )
{
if ( d->connected == CON_PLAYING &&
d->character != ch &&
get_trust(d->character) >= level )
send_to_char(buf, d->character);
}
}
Dunno why it is killing the prompt. I remember having this problem before,
but I cannot remember what I did to fix it.
Thanks