diff --git a/Config.txt b/Config.txt index e53f9ed..aad4f37 100644 --- a/Config.txt +++ b/Config.txt @@ -13,7 +13,7 @@ 12101 - User ID not specified 12102 - 0 questions wanted, no game without a question! 12103 - More questions wanted then existing -12104 - User name not existing +12104 - User ID not existing = answer.php = 13101 - User ID not specified @@ -27,3 +27,4 @@ = highscores.php = 15101 - User ID not specified +15102 - User ID not existing diff --git a/Database.php b/Database.php index 00e337e..17befad 100644 --- a/Database.php +++ b/Database.php @@ -71,6 +71,7 @@ class Database case 12103: return 'Sorry, we only have '.$values[0].' questions. Please try again.'; case 12104: + case 15102: return 'The specified user name does not exist. This is an internal error.'; case 13102: return 'No valid time specified. This is an internal error.'; diff --git a/highscores.php b/highscores.php index a661304..5fac8b7 100644 --- a/highscores.php +++ b/highscores.php @@ -23,7 +23,8 @@ if($uid == '') { $error = 15101; } else if($db->query('SELECT EXISTS (SELECT 1 FROM "Users" WHERE "ID" = $1)', array($uid)) ['data']['0']['exists'] == 'f') { - + $error = 15102; +} $score = $db->query('SELECT "highscore" FROM "Users" WHERE "ID" = $1', array($uid))['data'][0]['highscore']; $all = $db->query('SELECT COUNT (*) FROM "Users"')['data']['0']['count']; echo 'Score: '.$score;