void FileClose(int file)
Pass a handle to an open file, and verge frees the file and... stuff. Make sure you do this for each file you open, after you've finished using it. For... lots of reasons.
int count = 1; int file = FileOpen("save"+str(count)+".dat", FILE_READ); while(file) { FileClose(file); count++; file = FileOpen("save"+str(count)+".dat", FILE_READ); } FileClose(file); // Counts number of save games by opening them and checking if // The file pointer returned is valid, stopping when it's not // It's very important to remember to close the files after // Opening them, so they can be used later
There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
Your docs |