From ee21ca25c15a941ddbfdc34f017ee3d1b2140cd1 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Tue, 15 Nov 2022 17:31:56 +0100 Subject: [PATCH] - bools returned false on success --- jscore.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jscore.cpp b/jscore.cpp index 7161973..080d6c2 100644 --- a/jscore.cpp +++ b/jscore.cpp @@ -98,7 +98,7 @@ namespace jscore { const bool initOnlineScore(string game) { string strbuff = sendRequest("GET /score-list.php?game=" + game); - if (jscore_error) return jscore_error; + if (jscore_error) return not jscore_error; user u; char buffer[1024]; @@ -113,7 +113,7 @@ namespace jscore { *p=0; u.points = atoi(str); p++; str=p; score.push_back(u); } - return jscore_error; + return not jscore_error; } const int getNumUsers() { @@ -129,7 +129,7 @@ namespace jscore { const bool updateUserPoints(string game, string user, const int points) { string strbuff = sendRequest("GET /score-update.php?game=" + game + "&user=" + user + "&points=" + to_string(points)); initOnlineScore(game); - return jscore_error; + return not jscore_error; } string getUserData(string game, string user) {