diff options
| author | xHire <xhire@tuxportal.cz> | 2009-05-19 12:17:10 +0200 |
|---|---|---|
| committer | xHire <xhire@tuxportal.cz> | 2009-05-26 01:09:32 +0200 |
| commit | afb63da1374aadd4a5feccff020e65b616d9b84a (patch) | |
| tree | 3ee47e151ff8ec186bec3ffd5262d63ddca15f08 /src/server/highScore.c | |
| parent | a1d6339b26fc38d374cd400481a8703ba3199596 (diff) | |
Rewritten messages/comments in code of server
Rectified the coding style in code of server
Changed the empty score line "no_name" -> "---"
Fixed __WIN32 to __WIN32__
Diffstat (limited to 'src/server/highScore.c')
| -rw-r--r-- | src/server/highScore.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/server/highScore.c b/src/server/highScore.c index 50e6a13..cbab164 100644 --- a/src/server/highScore.c +++ b/src/server/highScore.c @@ -1,4 +1,3 @@ - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -18,22 +17,21 @@ void high_score_init(char *file) textFile = text_file_load(file); if (textFile == NULL) { - fprintf(stderr, _("I am unable to load: \"%s\"!\n"), file); - fprintf(stderr, _("Creating: \"%s\"\n"), file); + fprintf(stderr, _("[Error] Unable to load high score [%s]\n"), file); + fprintf(stderr, _("[Debug] Creating high score file [%s]\n"), file); textFile = text_file_new(file); } else { - - DEBUG_MSG(_("Scorefile: \"%s\"\n"), file); + DEBUG_MSG(_("[Debug] Loading high score file [%s]\n"), file); return; } if (textFile == NULL) { - fprintf(stderr, _("I was unable to create: \"%s\"!\n"), file); + fprintf(stderr, _("[Error] Unable to create high score file [%s]\n"), file); return; } for (i = 0; i < HIGHSCORE_MAX_PLAYERS; i++) { - list_add(textFile->text, strdup("no_name 0")); + list_add(textFile->text, strdup("--- 0")); } text_file_save(textFile); @@ -44,7 +42,7 @@ int table_add(char *name, int score) int i; if (score <= 0) { - return -1; // Ha ha ha + return -1; /* Ha ha ha */ } for (i = 0; i < HIGHSCORE_MAX_PLAYERS; i++) { @@ -61,7 +59,7 @@ int table_add(char *name, int score) sprintf(new, "%s %d", name, score); list_ins(textFile->text, i, strdup(new)); list_del_item(textFile->text, HIGHSCORE_MAX_PLAYERS, free); - //text_file_print(textFile); + /*text_file_print(textFile);*/ text_file_save(textFile); return 0; |