Hey Guys, I'm trying to make a highscores table and the specific thing I'm trying to do is only display the greatest high score,level...etc. Here is my code. Could you please tell me what I'm doing wrong?
I have the variables declared too. For some reason, whenever I wrap: WriteInt(), or any other Write function...It won't write. Does OpenFile() only open the file for write opperations, like ReadFile() prepares it for reading???
Function ModifyFile() f = OpenFile("maingamedata.dat") l = ReadInt(f) h = ReadInt(f) t = ReadInt(f) If l > 0 WriteInt(f,leveln) EndIf If h > 0 WriteInt(f,score) EndIf If t > 0 WriteInt(f,time) EndIf CloseFile(f) End Function
I have the variables declared too. For some reason, whenever I wrap: WriteInt(), or any other Write function...It won't write. Does OpenFile() only open the file for write opperations, like ReadFile() prepares it for reading???