Having troubles with 'Set INI file' action.

For questions about using Classic.

Post » Thu Jan 22, 2009 6:17 am

So I began using Construct several days ago after a long absence from it and I've come to the completion of my minigame which has a very simple High score system. I'm using INI to store the high score (can't it be encrypted to disallow editing?) and so far everything runs smoothly, except for a couple of things.

Problem One:
When I extract the game to EXE, the game is still trying to read the INI file from the previous location.
It might be hard to explain so I'll just give an example:

Action - [list:3h7ehail]> Start of layout INI: Set INI file to "Data\HS.ini"[/list:u:3h7ehail]
This, from what I know, reads the INI file from that location.

.Cap is in: C:\Cap\game.cap
INI is in: C:\Cap\Data\HS.ini

.EXE is in: C:\game\game.exe
Copied INI is in: C:\Game\Data\HS.ini

When I run the EXE, it's still reading from "C:\Cap\Data\HS.ini" despite only putting "Data\HS.ini" in the action. To make sure I changed the values of Copied HS.ini and deleted the original. This lead to the values coming up as 0.

Is the INI action capable of reading from the folder the .EXE file is in instead of an absolute path?

Problem Two:
Not really a problem, but when exporting to .EXE and creating an install, is it possible to allow it to install more than the executable? Or would I have to use an external install creator?

Any help appreciated!
B
2
S
2
G
3
Posts: 143
Reputation: 1,536

Post » Thu Jan 22, 2009 7:55 am

Try using the system expression appath.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Thu Jan 22, 2009 8:58 am

[quote="newt":1brs19b2]Try using the system expression appath.[/quote:1brs19b2]
After half an hour trying to comprehend what your post meant, it finally worked! Searching for appath brought up nothing, but appPath did :wink:

Seems like my minigame is 95% complete. Now I just need to clean up a few sprites before I post it :)

Thank you for your help. Greatly appreciated.
B
2
S
2
G
3
Posts: 143
Reputation: 1,536

Post » Thu Jan 22, 2009 10:47 am

Oops, sorry bout that, guess we know why I'm not a programmer.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Thu Jan 22, 2009 1:53 pm

It comes up straight away as a system expression with description if you search the wiki :P
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu Jan 22, 2009 2:19 pm

[quote="newt":2fdnleg7]Oops, sorry bout that, guess we know why I'm not a programmer.[/quote:2fdnleg7]
No need to be sorry, because of you I resolved me issue. Thanks again.

[quote="Ashley":2fdnleg7]It comes up straight away as a system expression with description if you search the wiki :P[/quote:2fdnleg7]
I did search for it after finding out it was called 'appPath', not 'appath', but then I had to find out what a system expression was! A quick search of the forums helped me with that. :D

I think I'll stick with INI for the high score, even though it can be easily edited with a text editor.

Now since the first problem is resolved, are there any answers for the second? I'm thinking there isn't since Construct is in beta stage afterall. Seems to be a feature better suited for later.
B
2
S
2
G
3
Posts: 143
Reputation: 1,536

Post » Thu Jan 22, 2009 2:24 pm

Yeah, I think you'll have to use an external install creator program. I'm not sure how customisable the built in one is.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu Jan 22, 2009 2:30 pm

[quote="Ashley":9lwnuyka]Yeah, I think you'll have to use an external install creator program. I'm not sure how customisable the built in one is.[/quote:9lwnuyka]
Ah well, a zipped file is really all I need. Thanks.
B
2
S
2
G
3
Posts: 143
Reputation: 1,536


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 10 guests