FileClose

FileClose
void FileClose(int file)

Documentation

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.

Example Usage

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
Talkback

There are no talkbacks on this documentation page yet. Post the first?

Post a new comment?

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.