In a game I wrote, game data is read and wrote from files in a directory in program files that it sets up, mostly in LONG format. It used to store data in TXT format, but when it is stored like this it is possible for the player to open a file (such as hiscore.txt), enter a random letter in and then save it. The result is that the high score will go to about 20,000,000. I changed the file format to DAT which means you have to use open with to edit it, but it still works. Since files always go to about 20,000,000 or above, a temporary fix is to make the game detect if a file has a number greater than 10,000,000 and if it has say the file has become corrupt to avoid cheating. However, I would prefer a more permanent method of avoiding files being edited altogether or having an easier check for corruption, since it will be a problem if some files need to have numbers over 10,000,000 for the actual game.
Sorry for the (quite) long post, any help is appreciated!