06 Jul, 2007, Vladaar wrote in the 1st comment:
Votes: 0
Hello,

I know I am missing something, but I just can't see it. I have a con state I added called con_tour, that checks after ansi/rip constate to see if they want a tour prior to entering the game. What happens now is the default Invalid selection. Please type Y, or N? Always shows up whether even before they type anything. Here's what it looks like, I'd appreciate it, if someone notices what I'm missing, and informs me. Thanks.

case CON_GET_WANT_RIPANSI:
switch (argument[0])
{
case 'r':
case 'R':
xSET_BIT(ch->act, PLR_RIP);
xSET_BIT(ch->act, PLR_ANSI);
d->connected = CON_TOUR;
write_to_buffer(d, "\n\r\n\rNow you have the option of going through an interactive tour.\n\rIt will teach the basics about the mud, it should only take a few minutes.\n\r\n\rPlease type ( Y/N )\n\r", 0 );
break;
case 'a':
case 'A':
xSET_BIT(ch->act, PLR_ANSI);
d->connected = CON_TOUR;
write_to_buffer(d, "\n\r\n\rNow you have the option of going through an interactive tour.\n\rIt will teach the basics about the mud, it should only take a few minutes.\n\r\n\rPlease type ( Y/N )\n\r", 0 );
break;
case 'n':
case 'N':
d->connected = CON_TOUR;
write_to_buffer(d, "\n\r\n\rNow you have the option of going through an interactive tour.\n\rIt will teach the basics about the mud, it should only take a few minutes.\n\r\n\rPlease type ( Y/N )\n\r", 0 );
break;
default:
write_to_buffer(d, "Invalid selection.\n\rRIP, ANSI or NONE? ", 0);
return;
}


case CON_TOUR:
switch (argument[0])
{
case 'y':
case 'Y':
break;
case 'n':
case 'N':
break;
default:
write_to_buffer(d, "\n\rInvalid selection.\n\rPlease type Y, or N? ", 0);
return;
}
07 Jul, 2007, kiasyn wrote in the 2nd comment:
Votes: 0
case CON_GET_WANT_RIPANSI:
switch ( LOWER(argument[0]) )
{
case 'r':
xSET_BIT(ch->act, PLR_RIP);
xSET_BIT(ch->act, PLR_ANSI);
break;
case 'a':
xSET_BIT(ch->act, PLR_ANSI);
break;
case 'n':
d->connected = CON_TOUR;
write_to_buffer(d, "\n\r\n\rNow you have the option of going through an interactive tour.\n\rIt will teach the basics about the mud, it should only take a few minutes.\n\r\n\rPlease type ( Y/N )\n\r", 0 );
break;
default:
write_to_buffer(d, "Invalid selection.\n\rRIP, ANSI or NONE? ", 0);
break;
}
d->connected = CON_TOUR;
write_to_buffer(d, "\n\r\n\rNow you have the option of going through an interactive tour.\n\rIt will teach the basics about the mud, it should only take a few minutes.\n\r\n\rPlease type ( Y/N )\n\r", 0 );
break;
case CON_TOUR:
switch ( LOWER(argument[0]) )
{
case 'y': break;
case 'n': break;
default:
write_to_buffer(d, "\n\rInvalid selection.\n\rPlease type Y, or N? ", 0);
return;
}
break;
07 Jul, 2007, Vladaar wrote in the 3rd comment:
Votes: 0
Thanks,

That did the trick.

Vladaar
09 Jul, 2007, Darwin wrote in the 4th comment:
Votes: 0
Doesn't that make it so that if they answer "n" to the rip/ansi question that they'll see the "Now you have the option of going through an interactive…" message twice?
09 Jul, 2007, kiasyn wrote in the 5th comment:
Votes: 0
yeah it does, i noticed the bug the other day but wasnt logged in so didnt post it. fix is to just change the break under case 'n', to return
0.0/5