Re: Player file corruption

From: Jeremy Elson (jelson@blaze.cs.jhu.edu)
Date: 06/30/94


> >Ack! Never had this one happen before..... I was doing what
> >I thought was pretty standard word, adding an integer
> >to the character information, in more or less the same way I had done
> >with races, just adding declarations in structs.h...
> >After compiling and starting the MUD, the player files were corrupted.
> >Is there a direct cause and effect between these two event, and if so
> >is there anything I can do to get my player file back?
> >When I try to log on as my imp, it just makes me recreate the
> >character EVERY time... ideas for somebody in too deep?
> >Nino
> >
> Yup...they are directly related.  If you make a change to the player info
> in the structs.h, it will cause a player file corruption.  The only way to
> get it back (that I know of) is to replace the player file with the backup
> I KNOW you made before you tried any changes. :>

Yes, all structures included in the playerfile are notated with:

/* Used in char_file_u *DO*NOT*CHANGE* */

char_file_u is the structure used to create the playerfile.  If you change
that structure or any of its components, the size of each record will change
and you won't be able to read your old playerfile.  The Circle code can
generally detect when this has happened on bootup -- when the player index
is being read, it should say "WARNING: PLAYERFILE IS PROBABLY CORRUPT!".

> To prevent this from happening later on, just use the extra fields (i think
> they are at the end of the specials2  part).

Yes, there are many structures labeled "sparen" where n is some integer.
Just change the name of one of the spares to some more meaningful name
and you're golden.

-je



This archive was generated by hypermail 2b30 : 12/07/00 PST