Original Post
I'm working on loading scores from a file. I've finished the saving part, and it works well. But when I try to load scores, the game freezes. I'm using stdio's FILE file io. This is my loading code:
the first string is name of the player, the 2nd one is for the score itself. The game freezes when I call this function. What did I do wrong?
[edited by - Zeraan on November 30, 2002 3:45:49 PM]
void TScore::Load()
{
FILE *inf;
inf = fopen("Scores.dat", "r");
for(int i = 0; i < 10; i++)
{
fscanf(inf, "%s", names[i]);
fscanf(inf, "%d", list[i]);
}
fclose(inf);
}