- bools returned false on success
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user