Help with loading ini variable

For questions about using Classic.

Post » Sat Sep 20, 2008 6:44 am

save worked perfect, but load ini something wrong with
INI.ItemString(Group, Item) i want when load button clicked then load text string from ini
here the cap file ini.cap

cant you make some example how use ini to load something


---
p.s Sorry for bad English
B
3
G
4
Posts: 21
Reputation: 1,142

Post » Sat Sep 20, 2008 8:12 am

well first off, it's not saving correctly (look in the ini file). maybe it's a bug, but it won't let you get the text of one of these edit text objects. you put quotes around yours, so it's just grabbing "1.Text" etc, rather than what's written in the box.

edit: found the solution. will upload .cap soon
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Sat Sep 20, 2008 8:49 am

Saving me is not important i make it just for view structure of ini file, but thanks for reply.
ini object have bug, nead fix it :roll:
B
3
G
4
Posts: 21
Reputation: 1,142

Post » Sat Sep 20, 2008 8:53 am

i got it working: http://upload.dfyb.net/uploaded/ini_fixed.cap

don't name those editable text fields integers (numbers). i had to rename them "one" and "two" etc. ideally, construct should fix this or not allow you to name them integers. you tried to get around this by putting the whole thing in quotes, which resulted it in writing "1.Text" etc, instead of grabbing what you typed into the text field named '1'. so yeah, name it something with letters like "one" or whatever.

and unlike the presented syntax when you try to get a string from an ini file, you need to put the group and item in quotes, like this: INI.ItemString("main", "3")
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Sat Sep 20, 2008 9:30 am

Awesome thanks :wink:
B
3
G
4
Posts: 21
Reputation: 1,142


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests