One high score per user?

3 posts (showing 1-3)

Market Level 0Community Level 2
106 posts

Does Gamersafe only allow one score per user? Even if I submit a new score that is lower, it just pops up showing my one highest score. I guess this is okay I just wanted to know if there was a way that after they pressed submit to tell them that it wasn't higher than their highest score.

posted 2014-03-27T20:40:09-07:00

Market Level 0Community Level 2
106 posts

Looking through the documentation I found a highscore variable but GamerSafe.api.highScore seems to always be 0. Can anyone help me find a way to retrieve the current user's highscore on a scoreboard?

I would like to be able to take their highscore from the scoreboard and compare it to their current score.

posted 2014-03-27T21:47:03-07:00

FGL AdminCommunity Level 7
1060 posts

Hey touchet,

Apologies for the delayed response, I've been trying to get to this response since the day you asked the question!

At the moment GamerSafe does only record the player's highest score on the scoreboard, provided they are logged into their account. If they are not logged in and you use the showScoreSubmit dialog to allow them to type in their name, I believe it will create a new entry for each new submission.

Another thing to note is that GamerSafe currently only records the top 100 scores for each time period (Today, Week, All Time), so if the player doesn't place in the top 100, they won't show on the scoreboard at all.

If you would like to track the player's score and customize how they are displayed (including adding their score to the scoreboard regardless of how high it is), you can actually do just that by downloading the scoreboard data as an array and then display it however you like.

Here's an example of how to retrieve the scoreboard data: 

[as3]   public function getScoreboard(scoreboardID:int = -1):void{
            gamerSafe.addEventListener(GamerSafe.EVT_SCOREBOARD_ENTRIES_RECEIVED, printBoard);
        private function printBoard(event:Event):void{
            //var scoreboard_id:int;
            //    var daily:Array;        // Array of scores for today
            //    var weekly:Array;    // Array of scores for this week
            //    var monthly:Array;    // Array of scores for this month
            //    var all:Array;        // All scores, ever.
            trace(String(gamerSafe.latestScoreboardEntries.all[0].username+" - "+
                            gamerSafe.latestScoreboardEntries.all[0].score+" - "+
                            gamerSafe.latestScoreboardEntries.all[0].ts+" - "+
                            gamerSafe.latestScoreboardEntries.all[0].extra)); }
Hope that helps!
posted 2014-03-29T17:22:50-07:00 | edited 2014-03-29T17:28:17-07:00