- bools returned false on success
This commit is contained in:
@@ -98,7 +98,7 @@ namespace jscore {
|
|||||||
|
|
||||||
const bool initOnlineScore(string game) {
|
const bool initOnlineScore(string game) {
|
||||||
string strbuff = sendRequest("GET /score-list.php?game=" + 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;
|
user u;
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
@@ -113,7 +113,7 @@ namespace jscore {
|
|||||||
*p=0; u.points = atoi(str); p++; str=p;
|
*p=0; u.points = atoi(str); p++; str=p;
|
||||||
score.push_back(u);
|
score.push_back(u);
|
||||||
}
|
}
|
||||||
return jscore_error;
|
return not jscore_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int getNumUsers() {
|
const int getNumUsers() {
|
||||||
@@ -129,7 +129,7 @@ namespace jscore {
|
|||||||
const bool updateUserPoints(string game, string user, const int points) {
|
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));
|
string strbuff = sendRequest("GET /score-update.php?game=" + game + "&user=" + user + "&points=" + to_string(points));
|
||||||
initOnlineScore(game);
|
initOnlineScore(game);
|
||||||
return jscore_error;
|
return not jscore_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
string getUserData(string game, string user) {
|
string getUserData(string game, string user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user