16 Jun, 2007, Zeno wrote in the 21st comment:
Votes: 0
kiasyn said:
sscanf is pretty error tolerant iirc, it should just ignore the missing value

AREA_VERSION_INDEX should be updated each time you make a change to the -saving- of the area file, you do not check against AREA_VERSION_INDEX when you load, you use magic numbers (yay!).

where did XBI come into this? =]


Er, but if there's a number after the final number and it's told to look for the new number (and it's not there, still an old area) won't it still read in the next number if one exists regardless of what it is for?

Magic numbers?

As for XBI, I didn't know if I should code the new variable into the true path of the block, or the false path.
16 Jun, 2007, Guest wrote in the 22nd comment:
Votes: 0
Your problem isn't actualy the sscanf. It's the fread_line function. If you add or remove values from the particular line of the file, I don't think it's going to throw things off. You'll only run into problems if your sscanf statement tries to read too much from the variable you passed it.

Using this kind of processing makes it easy to shuffle values around on single lines. You only need file version checks if the order of their assignment changes. But that has no affect on the file pointer's position during the loadup.
17 Jun, 2007, Kayle wrote in the 23rd comment:
Votes: 0
Whether that code works or not doesn't matter, I'm using a KEY'd loading now, everything is handled in a different way, but that is how I used to do it and it always worked fine. *shrug*
18 Jun, 2007, Zeno wrote in the 24th comment:
Votes: 0
lol I ran into some issues. I didn't load the proto areas, so they ended up being the old version. Trying to loadarea them would crash. Had to restore everything and start over. I think it's working now.
20.0/24