The Daily Click ::. Forums ::. Klik Coding Help ::. Loading different savegame slots... arghs
 

Post Reply  Post Oekaki 
 

Posted By Message

Blue66



Registered
  24/05/2008
Points
  1186

GOTW JUNE 2010 WINNER!Hero of TimeVIP Member
4th April, 2009 at 23:45:19 -

Hi!

Goddamn sometimes I f*cking hate MMF2. It's logic is like womens logic sometimes. You try to tell them how things go in the world, but they just don't want to listen and start making their own bs and piss you off like ... ok I'll get to the point.

Alright, I want to have different savegames called SLOT1 SLOT2 and SLOT3 to show up in a menu screen where you select which save slot you want to load.

so far so good.

Now what I do:
- set Save Slot to "slot1"
- load array from Appdrive$+Appdir$+"gg2save"+Save Slot+".dat"
- ~show stats for slot1~

- set Save Slot to "slot2"
- load array from Appdrive$+Appdir$+"gg2save"+Save Slot+".dat"
- ~show stats for slot2~

- set Save Slot to "slot3"
- load array from Appdrive$+Appdir$+"gg2save"+Save Slot+".dat"
- ~show stats for slot3~

I need the "Save Slot", because later in the game, you will save the data to your "Save Slot". This is a string btw.

That's what I wanna do. But when I tell this to MMF2, it just f*cks it up with no logical reason for me. Even if I call the slots slotA, slotB and slotC (I thought maybe it gets confused with numbers?!)... but MMF2 doesn't care.

When I only have one savegame for slot2 called "gg2saveslot2.dat" for example, it loads the stats into ALL slots, even if slot1 and slot3 don't exist. When I delete the "slot2" or just rename the savegame to "gg2saveZ" it loads it into all slots again. What's up with this nonsense?! When I tell MMF2 to load a f*cking string IT SHOULD BETTER LOAD THAT STRING and shouldn't load just random crap I don't want! wtf....

I'm sorry but this garbage is wasting my precious free time and that's just pissing me off...

Please any1 help me how the hell do I tell MMF2 to load the save slots properly! And when a file doesn't exist with that exact name don't load random crap!

Load one save file at a time, each nicely numbered, read the stats, go to the next slot, repeat. That's all I wanna do. Please help!

Thanks alot

Edited by Blue66

 
www.paulinthenet.de
www.gungirl2.com

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
5th April, 2009 at 00:50:08 -

Um... hmm. I think we might need to see a source or something. I'm not really good enough to be able to do this sort of thing without a source. Maybe strip the unimportant stuff and put up a file with just the broken things? Or wait for someone else to help...

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
5th April, 2009 at 00:54:33 -

That's virtually the same system I use.
What I also do is use an unsaved region of global values to hold stuff like which save file is being used and once the save is loaded that value won't change.

Depending on how your load system looks ingame you might want to consider dumping all your save file stats onto a dummy value box (active or whatever you're using) and when the save is highlighted it just displays the values.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Blue66



Registered
  24/05/2008
Points
  1186

GOTW JUNE 2010 WINNER!Hero of TimeVIP Member
5th April, 2009 at 07:30:46 -

The slot menu looks like in any other well known adventure game. You open the load menu screen and it shows 3 slots. And each slot has the according stats in it, so you can easily see which slot you want to continue and select it.

I check if any savegame exists by loading a value from each save slot that would return 0 if the save slot does not exist and add them together to one value called 'CheckValueExists'. If 'CheckValueExists' is greater 0, it shows the LOAD option on the screen. If the value is still 0, it doesn't show it. I guess it's a pretty stupid way to handle that, but I'm not smart enough to find a better solution...

And thank you Jon, that would be so awesome if you can tell me what I'm doing wrong.
I've uploaded the source code file here:

http://www.lostdimension.de/gg2/savegames.zip

Thanks in advance!

Edited by Blue66

 
www.paulinthenet.de
www.gungirl2.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
5th April, 2009 at 09:42:09 -

In your example there's no way to actually see what's happening seeing as though you didn't provide any data files or ways to display the data. But the code looks fine.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Blue66



Registered
  24/05/2008
Points
  1186

GOTW JUNE 2010 WINNER!Hero of TimeVIP Member
6th April, 2009 at 07:31:29 -

Alright, I've updated the file. It now has a save file which you can rename to test all save slots and loads and shows valueA of the saved files.

http://www.lostdimension.de/gg2/savegames.zip

PS: Setting global value A to 0 between loading the stats doesn't effect it. I've tried. So please tell me what's wrong here? Thanks alot!

Edited by Blue66

 
www.paulinthenet.de
www.gungirl2.com
   

Post Reply



 



Advertisement

Worth A Click