forked from github/server
writegame schreib das datenfile in den falschen folder
This commit is contained in:
parent
3298e06f7c
commit
b7dde0bcf0
|
@ -1303,7 +1303,7 @@ export_players(const char * path)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
int
|
||||||
writegame(const char *filename, char quiet)
|
writegame(const char *filename, char quiet)
|
||||||
{
|
{
|
||||||
int i,n;
|
int i,n;
|
||||||
|
@ -1325,10 +1325,9 @@ writegame(const char *filename, char quiet)
|
||||||
|
|
||||||
/* write_dynamictypes(); */
|
/* write_dynamictypes(); */
|
||||||
|
|
||||||
sprintf(buf, "%s/%s", datapath(), filename);
|
F = cfopen(filename, "w");
|
||||||
F = cfopen(buf, "w");
|
|
||||||
if (F==NULL)
|
if (F==NULL)
|
||||||
return;
|
return -1;
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf("Schreibe die %d. Runde...\n", turn);
|
printf("Schreibe die %d. Runde...\n", turn);
|
||||||
|
@ -1458,6 +1457,7 @@ writegame(const char *filename, char quiet)
|
||||||
#endif
|
#endif
|
||||||
fclose(F);
|
fclose(F);
|
||||||
printf("\nOk.\n");
|
printf("\nOk.\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ FILE * cfopen(const char *filename, const char *mode);
|
||||||
int readorders(const char *);
|
int readorders(const char *);
|
||||||
int creategame(void);
|
int creategame(void);
|
||||||
extern int readgame(const char * filename, int backup);
|
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);
|
extern void rsf(FILE * F, char *s, size_t len);
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,7 @@ write_game(const char *filename)
|
||||||
free_units();
|
free_units();
|
||||||
remove_empty_factions(true);
|
remove_empty_factions(true);
|
||||||
|
|
||||||
writegame(filename, 0);
|
return writegame(filename, 0);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int writepasswd(void);
|
extern int writepasswd(void);
|
||||||
|
|
|
@ -344,7 +344,7 @@ processturn(char *filename)
|
||||||
if (!nowrite) {
|
if (!nowrite) {
|
||||||
char ztext[64];
|
char ztext[64];
|
||||||
sprintf(ztext, "%s/%d", datapath(), turn);
|
sprintf(ztext, "%s/%d", datapath(), turn);
|
||||||
writegame(ztext, 0);
|
return writegame(ztext, 0);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue