Okay ill show the code before the problem...
Inside remort.c in do_remort()
i have:
ch->pcdata->mclass[0] = oldch->class;
if( ch->pcdata->tier == 2 )
ch->pcdata->mclass[1] = ch->class;
else
ch->pcdata->mclass[1] = oldch->class;
if( ch->pcdata->tier == 3 )
ch->pcdata->mclass[2] = ch->class;
else
ch->pcdata->mclass[2] = oldch->class;
Inside comm.c in function nanny()
after:
case CON_READ_MOTD:
{
char motdbuf[MAX_STRING_LENGTH];
sprintf( motdbuf, "\n\rWelcome to %s...\n\r", sysdata.mud_name);
write_to_buffer( d, motdbuf, 0 );
}
add_char( ch );
d->connected = CON_PLAYING;
I have:
if( ch->pcdata->mclass[0] == NULL )
{
ch->pcdata->mclass[0] = ch->class;
ch->pcdata->mclass[1] = -1;
ch->pcdata->mclass[2] = -1;
}
in name_stamp_stats( ch );
after
i have:
ch->pcdata->mclass[0] = ch->class;
ch->pcdata->mclass[1] = -1;
ch->pcdata->mclass[2] = -1;
Inside save.c in fwrite_char()under:
fprintf( fp, "Class %d\n", ch->class );
I have this...
fprintf( fp, "mclass %d %d %d\n", ch->pcdata->mclass[0]?ch->pcdata->mclass[0]: -1, ch->pcdata->mclass[1]?ch->pcdata->mclass[1]:-1, ch->pcdata->mclass[2]?ch->pcdata->mclass[2]:-1 );
and in fread_char() under case 'M'
i have:
if ( !strcmp( word, "mclass" ) )
{
ch->pcdata->mclass[0] = fread_number( fp );
ch->pcdata->mclass[1] = fread_number( fp );
ch->pcdata->mclass[2] = fread_number( fp );
}
What im trying to do is get remort to write to a pc_data struc (which iv made in mud.h allready) when your first make a character with 'mclass <current class> -1 -1'
then when your remort the first time change it to
'mclass <first class> <current class> -1'
then the final remort change it to:
'mclass <first class> <second class> <current class>'
that way i can get do_practice to read mclass instead of class and that should then display all the practices that can be used by those THREE classes (if you can help with any of this let me know please!)
btw the following comes back with when u remort
[*****] BUG: Fread_char: no match: Mclass
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: Mclass
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
and again when you login:
[*****] BUG: Fread_char: no match: Mclass
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: Mclass
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
[*****] BUG: Fread_char: no match: -1
Any help would be really really great!!!!
Rash