Clearing content of INI files (?)
Is there any way for clearing all content at once of a INI file using the INI object?
I can see the three delete actions, but what if the file has been tampered and some of the content got corrupted? Is there any way to replace the file with a new one?
I mean, a "Clear All Content" action will suffice, there´s no need to replace the file. What can I do?
Re: Clearing content of INI files (?)
Re: Clearing content of INI files (?)
Cannot find a way to do it :(
Re: Clearing content of INI files (?)
Searched again, with no luck.
Is there any MMF object/function (for the IPhone) that helps me delete a file?
Re: Clearing content of INI files (?)
Ok, cannot find a way to delete/clear a file (new feature request?).
I have found a bug: ini files/values are not being saved in the device. However, they are saved fine on the PC and the iphone simulator.
Re: Clearing content of INI files (?)
Yves - the ini object can't delete files and there isn't a file management object for the iPhone. That's what BHGames is saying.
BHGames - as a work around, either delete the groups that you need to, or set the current file to something else?
You could maintain two inis, one with a somewhat random name, eg. "data120.ini" which holds your game data and one called "filename.ini" which simply holds the current ini file you are using. When you want to 'delete' your file, make a new random file and change filename.ini to correspond to this new file name. Load the file from the name in filename.ini.
This is of course messy and a bad way of wasting space, but if you don't have to do it often it might be an option... until a better solution is available.
Re: Clearing content of INI files (?)
@nenninja: I will use the first option "delete the groups that you need to" since the remaining ones are cumbersome. But I'd love to have a "clear all content" action in the INI object.
But what really worries me, currently, is the bug that INI values (or the file itself) are not being stored on the device.
Re: Clearing content of INI files (?)
I confirm that with beta 7, INI files are properly saved :)
Re: Clearing content of INI files (?)
In beta 8, INI files are not being saved on the device.
Re: Clearing content of INI files (?)
Is this fixed now? (I mean, are INI files being saved on the device?)
One thing I noticed in Windows, if you specify ".\" as the location for your INI, the MMF editor automatically changes the route to "C:\Users\<username>\AppData\Roaming\Clickteam\fil ename.extensionyouuse". However, if you specify "./" the file is saved in the game folder.
Now, with the new Highscore object, the associated ini file is always saved in "C:\Users\<username>\AppData\Roaming\Clickteam\fil ename.extensionyouuse", regardless whether you set ".\" or "./".
In both cases, I used a custom extension.