Hey, I'm getting this error: "parse error at en of input"
It's on my last line of code. I've had this error before, just I can't remember how I fixed
I think the problem is more of GCC just being picky, then the actual code.
Here's the code at the end of the file:
If needed, I'll upload the file. It's about 5,500 lines of code, so I can't paste it all here
Thanks for any help!
It's on my last line of code. I've had this error before, just I can't remember how I fixed
I think the problem is more of GCC just being picky, then the actual code.
Here's the code at the end of the file:
Code:
void save_options(void)
{
FILE * fi;
char fname[512];
if (getenv("HOME") != NULL)
{
snprintf(fname, sizeof(fname), "%s/.defendguinrc", getenv("HOME"));
fi = fopen(fname, "w");
if (fi != NULL)
{
fprintf(fi, "# Defendguin Options File\n\n");
fprintf(fi, "CONFIG_EFFECTS_VOLUME = %d\n", vol_effects);
fprintf(fi, "CONFIG_MUSIC_VOLUME = %d\n", vol_music);
fprintf(fi, "CONFIG_JOY_FIRE = %d\n", joy_fire);
fprintf(fi, "CONFIG_JOY_BOMB = %d\n", joy_bomb);
fprintf(fi, "CONFIG_JOY_X = %d\n", joy_x);
fprintf(fi, "CONFIG_JOY_Y = %d\n", joy_y);
fprintf(fi, "SCORE_LAST_1 = %d\n", score[0]);
fprintf(fi, "SCORE_LAST_2 = %d\n", score[1]);
fprintf(fi, "LEVEL_LAST_1 = %d\n", level[0]);
fprintf(fi, "LEVEL_LAST_2 = %d\n", level[1]);
fprintf(fi, "SCORE_HIGH = %d\n", highscore);
fclose(fi);
}
}
}
Thanks for any help!