I don't want to bog anyone down with my actual script, which is quite long and complicated, but what's happening is that when the game reads from a file, and it reaches the end of the file, it's supposed to read a zero "0".

However, sometimes, instead of a zero, it reads some strange random number. I have no idea why these numbers show up, instead of the zero.