writegame schreib das datenfile in den falschen folder

This commit is contained in:
Enno Rehling 2003-12-28 10:54:47 +00:00
parent 3298e06f7c
commit b7dde0bcf0
4 changed files with 7 additions and 8 deletions

View File

@ -1303,7 +1303,7 @@ export_players(const char * path)
}
#endif
void
int
writegame(const char *filename, char quiet)
{
int i,n;
@ -1325,10 +1325,9 @@ writegame(const char *filename, char quiet)
/* write_dynamictypes(); */
sprintf(buf, "%s/%s", datapath(), filename);
F = cfopen(buf, "w");
F = cfopen(filename, "w");
if (F==NULL)
return;
return -1;
if (!quiet)
printf("Schreibe die %d. Runde...\n", turn);
@ -1458,6 +1457,7 @@ writegame(const char *filename, char quiet)
#endif
fclose(F);
printf("\nOk.\n");
return 0;
}
/* ------------------------------------------------------------- */

View File

@ -37,7 +37,7 @@ FILE * cfopen(const char *filename, const char *mode);
int readorders(const char *);
int creategame(void);
extern int readgame(const char * filename, int backup);
void writegame(const char *filename, char quiet);
int writegame(const char *filename, char quiet);
extern void rsf(FILE * F, char *s, size_t len);

View File

@ -51,8 +51,7 @@ write_game(const char *filename)
free_units();
remove_empty_factions(true);
writegame(filename, 0);
return 0;
return writegame(filename, 0);
}
extern int writepasswd(void);

View File

@ -344,7 +344,7 @@ processturn(char *filename)
if (!nowrite) {
char ztext[64];
sprintf(ztext, "%s/%d", datapath(), turn);
writegame(ztext, 0);
return writegame(ztext, 0);
}
return 0;
}