I'm currently having problems stopping my Remort Classes from been displayed upon player creation.
Here's the output I currently get;
Everything after Barbarian is a remort class (Set RemortClass 1 within the class file)
Here's the offending code;
Can anyone spot what the problem is? It's probably something simple.
Here's the output I currently get;
Select a class, or type help [class] to learn more about that class.
[Warlock Assassin Elementalist Knight Sorcerer NecromancerSamurai Mystic
BarbarianshogunBerserkerRangerPaladinBlademasterDruidCultistArchmagedaemonologistDefilerBishopAdept]
Everything after Barbarian is a remort class (Set RemortClass 1 within the class file)
Here's the offending code;
write_to_buffer( d, "\n\rSelect a class, or type help [class] to learn more about that class.\n\r[", 0 );
buf[0] = '\0';
/*
* Take this out SHADDAI
*/
for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
{
if ( class_table[iClass]->who_name && !class_table[iClass]->remort_class == 1 && class_table[iClass]->who_name[0] != '\0')
{
if ( iClass > 0 )
{
if ( strlen(buf)+strlen(class_table[iClass]->who_name) > 77 )
{
strcat( buf, "\n\r" );
write_to_buffer( d, buf, 0 );
buf[0] = '\0';
}
else
strcat( buf, " " );
}
}
strcat( buf, class_table[iClass]->who_name );
}
strcat( buf, "]\n\r: " );
write_to_buffer( d, buf, 0 );
d->connected = CON_GET_NEW_CLASS;
break;
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]->remort_class == 1 && class_table[iClass]->who_name[0] != '\0')
{
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)
{
if ( toupper(arg[0]) == toupper(class_table[iClass]->who_name[0])
&& !str_prefix( arg, class_table[iClass]->who_name ) )
{
ch->class = iClass;
break;
}
}
}
Can anyone spot what the problem is? It's probably something simple.