The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Easy Saving! (Perhaps INI help?)
 

Post Reply  Post Oekaki 
 

Posted By Message

Sweetjuice



Registered
  05/08/2007
Points
  128
25th May, 2008 at 15:04:14 -

Hello dear game creators!

I'm making my biggest game yet (called Halmstad Adventure if anyone is interested), but i have a problem with the saving function.
I've been reading some of the many INI saving articles, and could with help from them save the character your playing stats, gold, experience, position and so on.
This works perfect on my PC, creates a new file called "Saved" when clicking "Save", and loads the saved data when clicking "Load".
I installed this on some friends computer, but when i click on load things won't load, instead you level up constantly When i click on save the map called "Saved" doesn't appear...
I am using TGF2, will perhaps change to MMF later.

Hope anyone can help me with my lil' problem Thanks for reading.

 
It's sweet.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
25th May, 2008 at 15:13:33 -

Sounds like you've got an issue with where the ini is located. try doing appath$ + "saved.ini" when you're setting where the INI will be loaded from. This should make it so your INI appears in the same directory as your game.

 
Craps, I'm an old man!

Sweetjuice



Registered
  05/08/2007
Points
  128
25th May, 2008 at 15:18:54 -


Originally Posted by Knudde (Shab)
Sounds like you've got an issue with where the ini is located. try doing appath$ + "saved.ini" when you're setting where the INI will be loaded from. This should make it so your INI appears in the same directory as your game.



I've donte that (I think), in start of frame i made Ini: Set current file to Appdrive$+Appdirr$+"Saved.ini"

 
It's sweet.

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
25th May, 2008 at 15:39:19 -

afaik, all you need is $appdir + "\Saved.INI"

i think $appdir includes the drive name

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Sweetjuice



Registered
  05/08/2007
Points
  128
25th May, 2008 at 15:47:24 -


Originally Posted by Pixelthief
afaik, all you need is $appdir + "\Saved.INI"

i think $appdir includes the drive name



Done... aaand... Done!
*Tries*
Works as usual for me, will send it to a friend and see if it works for him.

 
It's sweet.

Sweetjuice



Registered
  05/08/2007
Points
  128
25th May, 2008 at 16:16:39 -

(Sorry for double post)
It works fine! Thank you for you'r help

 
It's sweet.

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
25th May, 2008 at 17:02:43 -

$Appdir is awfully slow way to get ini, I prefer loading it from ".*/YAY.ini"

 
I have proven new mathematic formula to be true...

2D > 3D

Image


Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
25th May, 2008 at 17:08:30 -

i do that too, but I'm pretty sure there no speed difference

I SHOULD note that there ARE some places where "./" instead of "$appdir" is dead necessary; some extensions and such cannot use spaces in their file names; for example the MCI object in TGF/MMF/MMF2 will not work if you pass it a pathname with spaces in it. So if the user put it in something like "C:/Computer Games/New Demos/stuff.exe", your program wouldn't play music with the MCI object. u gotta use "./filepath" stuff instead

Image Edited by the Author.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
28th May, 2008 at 17:46:34 -

I think an Array could be better for this type of game to be honest, but if it works for you, great

 
n/a
   

Post Reply



 



Advertisement

Worth A Click