*slinks back into newbie coder mode*
ok, on first reboot when i had no notes, everything went fine, i wrote a couple notes, rebooted, and now i get a bug along with the notes are showing up as new notes again. i still have to put the finishing touches in my save file etc. i forgot about those little details..heh. but i do need some help i think with this:
this is what i need to port over to smaug in fread_char. this is the envy code.
{ "Note", FALSE, 0, { &ch->last_note, NULL } },
i know that's not how to write it. i figure that it might have to look something along these lines.
here is the smaug code:
case 'N':
KEY ("Name", ch->name, fread_string( fp ) );
KEY ("NoAffectedBy", ch->no_affected_by, fread_bitvector( fp ) );
KEY ("NoImmune", ch->no_immune, fread_number( fp ) );
KEY ("NoResistant", ch->no_resistant, fread_number( fp ) );
KEY ("NoSusceptible", ch->no_susceptible, fread_number( fp ) );
if ( !strcmp ( "Nuisance", word ) )
{
fMatch = TRUE;
CREATE( ch->pcdata->nuisance, NUISANCE_DATA, 1 );
ch->pcdata->nuisance->time = fread_number( fp );
ch->pcdata->nuisance->max_time = fread_number( fp );
ch->pcdata->nuisance->flags = fread_number( fp );
ch->pcdata->nuisance->power = 1;
}
if ( !strcmp ( "NuisanceNew", word ) )
{
fMatch = TRUE;
CREATE( ch->pcdata->nuisance, NUISANCE_DATA, 1 );
ch->pcdata->nuisance->time = fread_number( fp );
ch->pcdata->nuisance->max_time = fread_number( fp );
ch->pcdata->nuisance->flags = fread_number( fp );
ch->pcdata->nuisance->power = fread_number( fp );
}
break;
i'm figuring that just:
KEY ("Note", ch->last_note, fread_number( fp ) );
won't work even though it does compile cleanly.
i put the code into nanny to get the number of notes when they log in, but it crashes the mud before i can log in. i'll try to move that around a little bit.