• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Values from INI randomly gets deleted

Caarbo

Member
Hello!
I'm using ini files as a save for my game. It's quite a big project and has been in development for a year and a half now.
In all this time I have never had any bugs with INI files.
Now that I have released an alpha version many people are experiencing the same problem.
I found out that there are "keys" all under the same "sections" that are sometimes just deleted from the file, they disappear.
I have looked at the code several times and everything seems normal, I'm using the same method I use for other "sections" that works.
What could be the reason for values to completely disappear from an ini file?
 
It must have been overwritten at some point or deleted. One way to know is, open the folder location where the ini is, then every step where there involve altering or reading the ini, you open it, you'll for sure see it go back to default or it get updated/deleted. That'd give you clue where you should fix.
 

Ommn

Member
Make sure that you are not deleting the file or deleting some sections or deleting some keys.
and
Never save texts containing a quotation mark “” in an ini file.

you can check from ini files in c://users/<your computer>/appdata/local/<project name>
 

Caarbo

Member
Thank you! I have just discovered that every time I write to an ini file, the contents of the section in which I am writing are deleted. I didn't know that and if it's true that's what's causing the problem.
 
Top