30 Oct 2017, 01:04
Several issues with this script.
First, FileAppend, there isn't a file defined for it so it doesn't do anything, and it's probably not what you want anyway and that should probably be deleted.
Second, set timer, why? and zero period and before the ini file is read. Also the label CookiesCounter is part of the auto execute section as there are no returns, i.e. SetTimer appears to be another redundant statement.
So this script functionally boils down to two statements, the IniRead, and the IniWrite. When you read the ini file you are giving the variable a default value of ERROR, i.e. the last argument in the command. So if there is nothing to read the value for ChristmasCookies becomes the string ERROR, hence when you write it, it writes the value in ChristmasCookies which is naturally going to be ERROR. To fix it use a default value of whatever you want it to be.