From ab15ad00c7cc6ec14fec6b54a55149feff9a7625 Mon Sep 17 00:00:00 2001 From: fdai7172 Date: Wed, 8 Feb 2023 19:34:24 +0100 Subject: [PATCH] Die sortierte Liste wird in die TXT geschrieben --- src/Paper-Bin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Paper-Bin.c b/src/Paper-Bin.c index 2f81f46..eec46a9 100644 --- a/src/Paper-Bin.c +++ b/src/Paper-Bin.c @@ -199,6 +199,11 @@ void sortScoreboard() FILE* fp = fopen("ScoreBoard.txt", "w"); + for (int i = 0; i <= numberOfLines +1; i++) + { + fprintf(fp, "%s %d\n", playerlist[i].Name, playerlist[i].Points); + } + fclose(fp); } } \ No newline at end of file