Posted By
|
Message
|
Dark Link
Registered 06/02/2009
Points 90
|
19th April, 2009 at 23:18:01 -
game isnt saving properly.
when i start the game fresh, u can buy items. Then you go to the next frame.
then you go to the main frame. Upon the start or end of the frame, the game saves.
If you restart the game, and try to load the file, all items in the ini++ are 0 except 5 items.
Source File is at top
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=138673#Post138673
http://www.create-games.com/project.asp?view=main&id=1554
Super Mario Conquest!
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
20th April, 2009 at 04:13:19 -
I fixed it, but I'm using MMF2 Dev
I hope you can load the file
http://www.jsoftgames.com/Grid.zip
But if you can't load the file I'll tell you what the problem was,
1. The global string used to check whether you were loading or starting a new game was named differently between the two frames that used them.
On the title screen when you selected load game it changed the global string named "New_File" to "No", but in the game screen it checked for the global string named "Load" to equal "Yes".
-To Fix this I just set the game screen to check the global string named "New_File"
2. At the end of the frame you save the position data and the global values to the ini, but in your load routine there is no code to load them back out of the ini.
-To fix this I simply made a loop that runs through the ini and loads the value data into the globals
(I know there is a command to do this built into ini++ but it crashed when I tried it)
3. The path to the ini was hard coded for a specific directory within the ini object
-Easy fix, just remove the path at the beginning, the ini++ is able to save the file to your game direcory automatically.
4. You don't have to load the ini at the beginning of every frame the ini++ object does it automatically
5. Don't enable "auto load" unless another program is editing the ini file simultaneously, as it hammers the hard disk. The file is loaded at the beginning of every frame and it is not necessary to load it again every time a condition checks it.
Fixed!
n/a
|
|
|