Ok, i fixed the problem before, but it has some new problems
case CON_GET_NEW_CLASS:
argument = one_argument(argument, arg);
if (!str_cmp(arg, "help"))
{
for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
{
if ( class_table[iClass]->who_name &&
class_table[iClass]->who_name[0] != '\0' && !class_table[iClass]->remort_class)
{
if (toupper(argument[0])==toupper(class_table[iClass]->who_name[0])
&& !str_prefix( argument, class_table[iClass]->who_name ) )
{
do_help(ch, argument);
write_to_buffer( d, "Please choose a class: ", 0 );
return;
}
}
}
write_to_buffer( d, "No such help topic. Please choose a class: ", 0 );
return;
}
for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
{
if ( class_table[iClass]->who_name &&
class_table[iClass]->who_name[0] != '\0' && !class_table[iClass]->remort_class)
{
ch->class = iClass;
break;
}
}
}
if ( iClass == MAX_PC_CLASS
|| !class_table[iClass]->who_name
|| class_table[iClass]->who_name[0] == '\0'
|| !str_cmp(class_table[iClass]->who_name,"unused"))
{
write_to_buffer( d, "That's not a class.\n\rWhat IS your class? ",0);
return;
}
if ( check_bans( ch, BAN_CLASS ) )
{
write_to_buffer (d,
"That class is not currently avaiable.\n\rWhat IS your class? ",0);
return;
}
write_to_buffer( d, "\n\rYou may choose from the following races, or type help [race] to learn more:\n\r[", 0 );
buf[0] = '\0';
for ( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if (iRace != RACE_VAMPIRE && !race_table[iRace]->remort_race
&& race_table[iRace]->race_name && race_table[iRace]->race_name[0] != '\0'
&& !IS_SET(race_table[iRace]->class_restriction, 1 << ch->class)
&& str_cmp(race_table[iRace]->race_name,"unused") )
{
if ( iRace > 0 )
{
if ( strlen(buf)+strlen(race_table[iRace]->race_name) > 77 )
{
strcat( buf, "\n\r" );
write_to_buffer( d, buf, 0 );
buf[0] = '\0';
}
else
strcat( buf, " " );
}
strcat( buf, race_table[iRace]->race_name );
}
}
strcat( buf, "]\n\r: " );
write_to_buffer( d, buf, 0 );
d->connected = CON_GET_NEW_RACE;
break; /*this line, it says break statement not within loop or switch*/
case CON_GET_NEW_RACE: /*this line, it says case label not within a switch statement*/
argument = one_argument(argument, arg);
if (!str_cmp( arg, "help") )
{
for ( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if ( toupper(argument[0]) == toupper(race_table[iRace]->race_name[0]) && !race_table[iRace]->remort_race
)
{
do_help(ch, argument);
write_to_buffer( d, "Please choose a race: ", 0);
return;
}
}
if (!str_cmp( arg, "help") )
{
for ( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if ( toupper(argument[0]) == toupper(race_table[iRace]->race_name[0]) && !race_table[iRace]->remort_race
&& !str_prefix( arg, race_table[iRace]->race_name ) )
{
ch->race = iRace;
break;
}
}
if ( iRace == MAX_PC_RACE
|| !race_table[iRace]->race_name || race_table[iRace]->race_name[0] == '\0'
|| iRace == RACE_VAMPIRE
|| IS_SET(race_table[iRace]->class_restriction, 1 << ch->class )
|| !str_cmp(race_table[iRace]->race_name,"unused")
)
{
write_to_buffer( d,
"That's not a race.\n\rWhat IS your race? ", 0 );
return;
}
write_to_buffer( d, "You may now roll for your character's stats.\r\nYou may roll as often as you like.\r\n",0);
name_stamp_stats(ch);
snprintf( buf, MAX_STRING_LENGTH, "\r\nStr: %d Int: %d Wis: %d Dex: %d Con: %d Cha: %d Lck: %d\r\nKeep? (Y/N)",
ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con,
ch->perm_cha, ch->perm_lck );
write_to_buffer( d, buf, 0 );
d->connected = CON_ROLL_STATS;
break; /*this line, it says break statement not within loop or switch*/
case CON_ROLL_STATS: /*this line, it says case label not within a switch statement*/
switch (argument[0] )
{
case 'y': case 'Y':
write_to_buffer( d, "\r\nWould you like ANSI, or no graphic/color support, (A/N)? ", 0 );
d->connected = CON_GET_WANT_RIPANSI;
break;
case 'n': case 'N':
name_stamp_stats(ch);
snprintf( buf, MAX_STRING_LENGTH, "\r\nStr: %d Int: %d Wis: %d Dex: %d Con: %d Cha: %d Lck: %d\r\nKeep? (Y/N)",
ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con,
ch->perm_cha, ch->perm_lck );
write_to_buffer( d, buf, 0 );
return;
default: write_to_buffer( d, "Yes or No? ", 0 );
return;
}
break; /*this line, it says break statement not within loop or switch*/
|