The Daily Click ::. Forums ::. Klik Coding Help ::. Help with INI
 

Post Reply  Post Oekaki 
 

Posted By Message

Arneckian



Registered
  17/01/2005
Points
  984
13th January, 2006 at 09:55:18 -

Im making a big RPG with lots of stats and I cant get INI to work to save it. I have Global Store X but it keeps on bringing up errors. I have tried for ages to make it work.

Can someone please help me?

Image Edited by the Author.

 
Phizzy is God. Mod him.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
13th January, 2006 at 15:03:01 -

Saving:

[Insert event here]

-INI: Set file to (Appdrive$ + Appdir$ + "Filename.ini")
-INI: Set group to "group"
-INI: Set item to "item"
-INI: Set value to (value("HP counter"))


Loading (in MMF):

[insert event here]

-Counter: Set value to (GroupItemValue$( "Ini","group", "item" ))


Loading (in TGF):

[insert event here]

-INI: Set file to (Appdrive$ + Appdir$ + "Filename.ini")
-INI: Set group to "group"
-INI: Set item to "item"
-Counter: Set value to (value of( "Ini" ))


And that's it. You just change "Filename.ini" to whatever filename your INI has, and the "group" to whatever group you want to store the data in, and "item" to the item you want to store the data in, and so on. I can't help you more than that unless you can specify exactly what your problem with INI is.

Image Edited by the Author.

 
n/a

Jakob37



Registered
  07/08/2005
Points
  541
13th January, 2006 at 15:10:04 -

Itīs hard to know what the error is, you are not telling very much about which the errors is. Anyway, the way to do it as I think is the easiest is:

Always: Set INI "stats" to GlobalstoreX value1 (or something)
Start of frame: Set GlobalstoreX value1 to INI "stats".

When you have this all the changes on the globalstorevalues (status) are saved.
I have never discovered any errors with it.

He posted his just before me!

Image Edited by the Author.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
13th January, 2006 at 15:27:42 -

Did not. I edited mine multiple times before going back and seeing thy post
Nevermind. I've never used the Global Store X object, so I can't help you there.

 
n/a

Arneckian



Registered
  17/01/2005
Points
  984
14th January, 2006 at 08:23:22 -

Thankyou Axel. Now it works. I have tried Global Store X but when I run the application it says: "(A file I cant remember) has generated errors and will be shut down by windows".

 
Phizzy is God. Mod him.

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
14th January, 2006 at 13:04:33 -

I actually think the array object is easier to use in this kind of scenario.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click