I'm making a maths game which continuously asks multiplication sums for the player to type in the answers for until the in-game timer runs out. Each time the player scores correctly, the variable 'right' is increased by 1 and likewise for the variable 'wrong' upon answering incorrectly. Also, the variable 'points' increases or decreases after the user has submitted their answer and the variable 'currtime' has been configured to be the current computer time.
I now wish to save these stats (into the same file where the application is stored) into 'statistics.txt' if it exists, if not create it, noting all of the above. In the 'press <Escape>' event, which is the key I wish to close the game from, I have the following code:
stats = file_text_open_append('statistics.txt');
file_text_write_string(stats, string(currtime)+" -- Correct = "+string(right)+", Incorrect = "+string(wrong)+" & Points = "+string(points));
game_end();I now create a 'Windows NSIS installer' for the game, extract it, go into <User>/<Game name> and open the application, score a few points and then press <Esc> which closes the game. I now look into the file where the application is but no 'statistics.txt' file has been created... What's going wrong?
KingD.











