I am making a 2D overhead freeroamer game, and need a little help with the save system. Well, i figured, how i would make one, is have a button, and when ever the arrow overlaps it, and mousehit(1), it would write the information to a file called Save File.dat , or something along the lines of that. So i tried it out. I made it so it writes the amount of ammo the player has to the file.
The problem is when i read it. Maybe i dont understand file writing enough, i dont know. But what i dont understand is how do you know what you are reading. What if i say,
And instead it reads out the amount of money. I was reading the example for how to read. Maybe wat i am doing wrong is i am not putting it as part of the type?
Im not sure. I someone could tell me how to read correctly, and maybe even some about writing correctly that would really help.
Thanks everyone!
From,
Kevin
The problem is when i read it. Maybe i dont understand file writing enough, i dont know. But what i dont understand is how do you know what you are reading. What if i say,
Ammo= ReadInt(FileIn)
And instead it reads out the amount of money. I was reading the example for how to read. Maybe wat i am doing wrong is i am not putting it as part of the type?
Im not sure. I someone could tell me how to read correctly, and maybe even some about writing correctly that would really help.
Thanks everyone!
From,
Kevin