Search code examples
ionic-frameworkionic3google-play-servicesleaderboard

Google Play Services - Leaderboard max score 21,474,836.47$


I am using Ionic 3 in making my app QuickLife.

One of the things that is pushed to leaderboard is how much users earned money, and even if I push 50 million dollars to Google Services, max number that appears is 21,474,836.47$

googlePlaySubmitScore(data) {
    let age = data.age;
    // net Worth is money that is pushed, it is multiplied by 100 and Google will use that last two characters for decimal point
    let netWorth = data.netWorth * 100;
    let followers = data.numOfSocialFans;
    this.googlePlayGamesServices.isSignedIn()
        .then(() => {
            this.googlePlayGamesServices.submitScore({
                score: netWorth,
                leaderboardId: ID
            });
            this.googlePlayGamesServices.submitScore({
                score: age,
                leaderboardId: ID
            });
            this.googlePlayGamesServices.submitScore({
                score: followers,
                leaderboardId: ID
            });
        });
}

First 4 players have same net worth that is impossible to be same even in decimal point


Solution

  • That's the max of a signed integer (2^31 - 1). MySQL table of INT size https://dev.mysql.com/doc/refman/8.0/en/integer-types.html