I have the following happening:
1) A player can create a character.
2) A player can export that character to a file. In this, I am exporting values like the character's name, strength, intelligence, etc.
3) That file can be read successfully
4) The values for the character are populated successfully
So that's RPG stuff, no prob there.
What I think is happening is this: if I declare an array in the game and recompile, suddenly the character info being read contains lots of garbage strings.
So I've got:
- version 0.40 of the game (or whatever) reading and writing characters to disk OK.
- In version 0.41 I declare an array of FatChicks[10] and set it to zero.
- I recompile
- I start the game up, version 0.41
- I can now no longer read the previously-written-to-disk characters.
This seems a little weird to me. But I don't know how it writes those files. I mean, I know what *I* put in them, but is it storing memory addresses as well? Would that explain how things got screwed up?
If I go and create a new character with version 0.41, the newly-created characters import fine.
This isn't a blocker or anything. I anticipated making tens of thousands of characters while developing this game. I am just curious if this seems like reasonable behavior.
External file weirdness
Moderators: Ice Cream Jonsey, joltcountry
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
External file weirdness
the dark and gritty...Ice Cream Jonsey!
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
Ok, I'm not sure I'm entirely understanding you. You're saying, you have .40 writing one thing to file, then .41 adding one more thing (even though it's just set to 0) and it's ruining the values of everything?
If so, I've also noticed some inconsistencies in behavior if I have made any changes to what is being written. I think in such cases, you really ought to delete your external files and start anew. Once you get to a point where what is being written doesn't change, you should be fine, though.
I guess Kent should take this one.
If so, I've also noticed some inconsistencies in behavior if I have made any changes to what is being written. I think in such cases, you really ought to delete your external files and start anew. Once you get to a point where what is being written doesn't change, you should be fine, though.
I guess Kent should take this one.
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee