value in save name

For questions about using Classic.

Post » Thu Jun 28, 2012 4:55 pm

I want to have a value from ini file in file name.

i am trying it with scirras save/load system (for now it is easier to learn).
i have a value in ini file (group,item,value), the value is for example number 5

how do i need to write it if i want my save be named save5 (it means save + value from ini). is it possible?

thanks
B
4
S
2
G
1
Posts: 143
Reputation: 1,211

Post » Thu Jun 28, 2012 5:08 pm

I just want to say that I achieve that the save is named exactly as value. (example "5")... but I dont know how to write it to have some word before this value - for example "save5"
B
4
S
2
G
1
Posts: 143
Reputation: 1,211

Post » Fri Jun 29, 2012 4:49 am

I'd love to make an example, but I've run out of time for a while now. My open source game had a save/load system like this, both for saving a player profile for each player or for loading from different INI file names. You can view the topic/link to download here
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Fri Jun 29, 2012 12:49 pm

I think what You want is this: "Save" & 'numberVariable'

For example if You want to name Your save file "Save 5", and 5 is inside the global variable numberVariable, then You write the name of the save file as: "Save " & global('numberVariable')

EDIT:
I just saw You want the number value from the .INI file.
Then You would basically write it the same; just replace the global variable with the .INI file value: "Save " & INI.ItemValue(Group, Item)Shindoh2012-06-29 12:54:58
B
3
G
1
Posts: 70
Reputation: 615

Post » Mon Jul 02, 2012 1:49 pm

JayJay: it can be very useful for me, but i dont know where to find plugins that you use :(
Shindoh: thanks, it works :)
B
4
S
2
G
1
Posts: 143
Reputation: 1,211


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests