The Daily Click ::. Forums ::. Klik Coding Help ::. Saving And Loading
 

Post Reply  Post Oekaki 
 

Posted By Message

C.J Workshop.



Registered
  10/09/2004
Points
  255
5th January, 2005 at 13:18:57 -

I know this question allways seems to come up, but i need to know something about the ini file.I can save and load one piece of information easily, but when it comes to groups and items i get lost along the way and i cant load anything.Anyway this is what i want to know, as i didnt want to use passwords in my new game, i have added more than 2 ini files to it, will this in someway ruin the game ? or cause a problem ? please help because i want to get on with the game and not just worry with the saving system.

Thanks


Image Edited by the Author.

 
C.J

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
5th January, 2005 at 15:09:51 -

Are you using TGF of MMF? TGF's method of using INI files is slightly awkward as you have to switch to a certain group/item then alter its value or string, and then repeat this for all values that you want to alter.

 
http://www.davidn.co.nr - Games, music, living in America

C.J Workshop.



Registered
  10/09/2004
Points
  255
5th January, 2005 at 15:24:26 -

Im using tgf

 
C.J

AS Filipowski



Registered
  29/02/2004
Points
  444
5th January, 2005 at 16:57:37 -

No problem using 2 or more INIs, its just less space comsuming to have 1000 things in 1 INI than 1000 INIs.

 
I do not have a signature of my own

C.J Workshop.



Registered
  10/09/2004
Points
  255
5th January, 2005 at 17:29:02 -

ok thnx

 
C.J

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  441234

VIP MemberLikes TDCKitty
5th January, 2005 at 19:27:43 -

although late : just use 1 INI, but 2 works fine. It really makes no difference...hence 'groups'.

 
thinking is like pong, it's easy, but you miss sometimes.

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
5th January, 2005 at 19:48:21 -

As long as you don't put the multiple ini's in the Windows folder, I really don't care, but it's not too hard to understand ini's. If it's easier, make a "start of frame" event that loads all neccessary information into global values, lives, or counters.
Start of Level: set ini object to "save.ini". Set group to "Data1". Set item to "HP". Set Player 1's lives to value of INI object. Set item to "MP". Set Player 1's score to value of INI Object. Set group to "Data2". Set item to "Gold". Set Global Value 1 to value of INI Object, etc.
Just open the group where you with the items you want, then select the item to temporarily store the value where you want it. If you want another item in that group, then just choose another item. If you want an item in another group, change the group first, then choose the wanted item.

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames
   

Post Reply



 



Advertisement

Worth A Click