variant programming - broken savefiles - help!

G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

I'm working on a variant based on V.

I didn't change anything to monsters or load.c

However, when I change the version number in defines.h, it says...

"too many (8192) monsters" and then "broken savefile"

Unless I can fix this my variant will forever be version 3.0.5 ...

It breathes confusion -more-

--
http://www.gamedruid.com/guides/angband/
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

"gamedruid" <gamedruid@gamedruid.com> wrote in message news:d5gs7p$sgf$1@news.vol.cz...
>
> I'm working on a variant based on V.
>
> I didn't change anything to monsters or load.c
>
> However, when I change the version number in defines.h, it says...
>
> "too many (8192) monsters" and then "broken savefile"
>
> Unless I can fix this my variant will forever be version 3.0.5 ...
>
> It breathes confusion -more-
>
> --
> http://www.gamedruid.com/guides/angband/
>

I think it is either one of two things.....

That error message usually means the game ha saved a piece of data as one variable size, but is trying to read it as another size, such as writing a byte sized piece of information, then reading it as an integer, so it read part of the next price of information, and the savefile breaks from there. Start at where the error message is checked for and displayed, and work backwards in load.c, comparing it to save.c. It probably isn't more than a couple lines of code away.

The other possibility is that a string is being terminated properly when being saved, or isn't long enough, so the load file is reading too much data when trying to read that string.

At least that's what was happening to me when I was getting those errors. I hope that helps, and good luck,

-Jeff
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

On 2005-05-07 00:48:25, gamedruid <gamedruid@gamedruid.com> wrote:

> I'm working on a variant based on V.
>
> I didn't change anything to monsters or load.c
>
> However, when I change the version number in defines.h, it says...
>
> "too many (8192) monsters" and then "broken savefile"
>
> Unless I can fix this my variant will forever be version 3.0.5 ...
>
> It breathes confusion -more-


Ok, now I took a fresh copy of V 3.0.5 and just changed the version number to
1.0.0

It gives me the same error.

Increasing the version to 4.0.5 works, so I'm thinking backwards compatibility
code.

Sadly, chopping out anything using older_than() didn't fix it.

Now what?

--
http://www.gamedruid.com/guides/angband/
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

gamedruid wrote:
> On 2005-05-07 00:48:25, gamedruid <gamedruid@gamedruid.com> wrote:
>
>> I'm working on a variant based on V.
>>
>> I didn't change anything to monsters or load.c
>>
>> However, when I change the version number in defines.h, it says...
>>
>> "too many (8192) monsters" and then "broken savefile"
>>
>> Unless I can fix this my variant will forever be version 3.0.5 ...
>>
>> It breathes confusion -more-
>
>
> Ok, now I took a fresh copy of V 3.0.5 and just changed the version number
> to 1.0.0
>
> It gives me the same error.
>
> Increasing the version to 4.0.5 works, so I'm thinking backwards
> compatibility code.
>
> Sadly, chopping out anything using older_than() didn't fix it.

Are you sure that you removed the older_than() calls correctly? I just
tried the version number change and had no problems. Watch out for the
'else' branches for the 'if (older_than(...))' and 'if (!older_than(...))'
checks. Especially the later one can by tricky. If you don't keep the
correct branches then you'll get errors.

--
Robert Ruehlmann ( rr9@thangorodrim.net )
"Thangorodrim - The Angband Page" : http://www.thangorodrim.net/
Visit the #angband chat channel at irc.worldirc.org
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.angband (More info?)

On 2005-05-07 13:21:43, Robert Ruehlmann <rr9@thangorodrim.net> wrote:

> gamedruid wrote:
> > On 2005-05-07 00:48:25, gamedruid wrote:
> >
> >> I'm working on a variant based on V.
> >>
> >> I didn't change anything to monsters or load.c
> >>
> >> However, when I change the version number in defines.h, it says...
> >>
> >> "too many (8192) monsters" and then "broken savefile"
> >>
> >> Unless I can fix this my variant will forever be version 3.0.5 ...
> >>
> >> It breathes confusion -more-
> >
> >
> > Ok, now I took a fresh copy of V 3.0.5 and just changed the version number
> > to 1.0.0
> >
> > It gives me the same error.
> >
> > Increasing the version to 4.0.5 works, so I'm thinking backwards
> > compatibility code.
> >
> > Sadly, chopping out anything using older_than() didn't fix it.
>
> Are you sure that you removed the older_than() calls correctly? I just
> tried the version number change and had no problems. Watch out for the
> 'else' branches for the 'if (older_than(...))' and 'if (!older_than(...))'
> checks. Especially the later one can by tricky. If you don't keep the
> correct branches then you'll get errors.
>
> --
> Robert Ruehlmann ( rr9@thangorodrim.net )
> "Thangorodrim - The Angband Page" : http://www.thangorodrim.net/
> Visit the #angband chat channel at irc.worldirc.org
>
>

YES! That's it, I was tricked by an if (!older_than).

Thank you. Now I'm mere hours away from a test version.

--
http://www.gamedruid.com/guides/angband/