Saving with the ini-object (the easy way).
  
    
    	
    	| 
        Author: |  Jenswa
         | 
        Submitted: |  23rd June, 2003
         |  
        | 
        Views: |  7445
         | Rated: | 
        
        		
         |  
         
     | 
   
    
       
      
      
Saving with the ini-object (the easy way).
 
 
author:	HoogHaar
 
date:	23 June 2003
 
target:	Newbies
 
 
Many people didn't understand my article about the ini-plus object
 
(all methods were explained but whatever).
 
I am going back to the basics and explain something more with
 
an example file (ini.zip contains: this file + ini.gam)
 
(sorry, this link is no longer available)
 
 
So for people who want to save something, they can use the ini-object
 
supplied with the games factory.
 
 
In this article i'll explain how to save and load value from the ini-file.
 
 
 
Create a new tgf-file (size and color doesn't matter), insert an ini-object, two counters and create four text-buttons.
 
- With ini file to use, enter save.ini (the ini-file is located in the windows system directory),
 
- the two counters must be visible use numbers (doesn't matter as long as it's visible),
 
- the four text-buttons should be labelled: save, load, more, less.
 
 
The buttons less and more, should decrease and inscrease counter 1.
 
- So if button less is clicked, counter 1 substract one.
 
- if button more is clicked, counter 1 add one.
 
 
The buttons save and load, should save the current number of counter 1
 
or load the value in the ini-file.
 
- So if button save is clicked, set value of the ini-object to  'value( Counter 1 )', without ''.
 
- if button load is clicked, set counter 2 to the value of the ini-object  'value of( Ini )', without ''.
 
 
These are the basics of the ini-object, it's works the same with text (text is not a value,
 
so don't use counters but strings).
 
Now you know the basics of the ini-object, you can continue to read
 
my other article Guide to save system with ini-plus:,
 
you can create a better and more advanced save-system, the way it's
 
implemented in HoogHaar XL (not released yet).
 
 |  
  
 
	
	 
	
	 
	
	
		
		
  
	
	
 | 
  JenswaPossibly Insane   
Registered  26/08/2002
 Points  2748
  
 
	 |