Problem with GetTopNRankers

0 votes
I am trying to get the top 5 scores, using the following...

 

Game topRankers = scoreBoardService.GetTopNRankers(GameName, 5);

For some reason, no matter what value I give for MAX (5 in the example above), the GetScoreList() count is always 1, and only contains the highest score.

 

Any idea what I might be doing wrong here?

 

Thanks,

-Larry
asked Jan 26, 2015 in App42 Cloud API-BaaS by ladimaco (15 points)
Never mind. Figured it out. I am an idiot. :)  Needed to call GetTopNRankings, not GetTopNRankers :(

1 Answer

0 votes
 
Best answer

Hello Ladimaco,

 
GetTopNRanker & GetTopNRanking both method are written on the different concept. In GetTopNRanker method, you will only find the top score of user made in the game but in GetTopNRanking method, you will find the list of scores in sorted format.
 
For example: We have a list of user A & B in the leaderboard in which A has scored 400, 200 and B scored 300. In this when you call GetTopNRanker method, you will find only two records where A is  on 1st position and B on second. Where in GetTopNRanking method, you will find three position in which A is on first and third and B is on second. 
 
In your case, you find 1 count because of only one user have scored in the game. You can save the scores for four to five users & you will find the desired result. Please check & let us know if it helps.
 
Thanks,

Himanshu Sharma

answered Jan 26, 2015 by hs00105 (2,005 points)
selected Jan 29, 2015 by ladimaco
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...