small problem of loading from INI file
hi to all, I apologize in advance for my English, but I am an Italian user ^_^
I have a small problem with the INI file ...
carryover an example similar to my problem, I hope you can help me solve it ..
I called 3 counters num1 num2 num3 worth respectively 10 20 30. these counters are part of group "A".
at the press "S", these counters are saved on the file "example.ini" in this way:
imposed as the file name "example.ini"
imposed as the name of the group "A"
imposed as an object "num1"
imposed as a "present value of num1"
imposed as an object "num2"
imposed as a "present value of num2"
imposed as an object "num3"
imposed as a "present value of num3"
INI files on "example.ini" I have this result:
[A]
num1 = 10
num2 = 20
num3 = 30
is fair this result and procedure? it's right?
ok .... now at the press "L", I want to load the values, previously saved, these 3 counters from the "example.ini" files.
what is the correct procedure for doing so?
thank you very much anticipated for the answers!
Re: small problem of loading from INI file
Hi,
just have this event:
* onSomeEvent
- ini: set group to "A"
- ini: set item to "num1"
- counter1: set current value to value of ini
- ini: set item to "num2"
- counter2: set current value to value of ini
- ini: set item to "num2"
- counter3: set current value to value of ini
If you have problems, there is an INI tutorial of mine in the Tutorial Section of this site.
Re: small problem of loading from INI file
hi! mh..
I will read your tutorial! ^_^ hehe
but still I am not one thing is clear:
onSomeEvent the only operations I can do on the counter are:
adjusts the counter
Add to counter
Subtract to counter
So the counter can only give this instruction:
- Counter1: set current value to value of ini
Where can I set the group and the object?
Re: small problem of loading from INI file
the group is set from the ini object
To load a value, you first have to specify what to load from the ini object, then you load it into the counter. When that is done, you do the same with the next value, in the same event.
So in my post above, you see that the order of the actions are very important.
First it prepares the ini to load item "num1".
Then the counter1 is set to this value.
After that it prepares the ini to load item "num2".
Then the counter2 is set to that value.
Etc....
Re: small problem of loading from INI file
mh mh mh .... perhaps I understand!
Popcorn you are a resource very useful and valuable!
thank you very much, now are at work, but later when I go home I try and then I'll tell you.
I leave you my contact msn: manu.manu.manu@hotmail.it, perhaps after contact us and if I have not yet solved the problem you explain better perhaps with some screenshots ^_^
ok? thank you very much .. see tou later! bye!