Rank is missing

0 votes

Hello

When I use GetTopNRankings() the received scores have no rank. I mean that when I use GetRank() on received Score it returns nothing, but GetUserName() and GetValue() return right information.

Also, if I use GetUserRanking() it returnes full information including Rank.

I found the same topic but for another platform

http://forum.shephertz.com/?qa=3000/ranking-is-missing

and that man fixed this by changing some source code, but in Unity I have only dll library and it seems like I can't change anything.

How could I fix this?

asked Jan 24, 2017 in Unity by xerolp933 (22 points)

2 Answers

0 votes
Since that method returns TOP N rankings I don't really need to know their ranks, I can just numerate them from 1 to N.
answered Jan 25, 2017 by xerolp933 (22 points)
0 votes

Hi Xerolp.

 

In GetTopNRankings method, results are returned in descending order and it means the first score in the list will consider as the first rank. So basically the index of the array list is equal to the rank of a user. For your second concern, yes you are right only, GetUserRanking API will give you rank value in response. 

Let me know if above information helps in your concern or you need any other help from our side. 

P.S: The issue which mentioned and solved by changing the source code on this (http://forum.shephertz.com/?qa=3000/ranking-is-missing) thread was different.  If you can go through Rajeev comment then you can see only GetUserRabking method returns the rank of the users. 

Note: GetTopNRanking returns the response based on score saved inside App42 database in descending order. It will not provide unique users list in the array. For example: If A scored 500,400 and B scored 450 in the game, then above function will return three entries in descending order like 500,450 & 400. If you want only one entry(top score) of a user in leaderboard then please use GetTopNRankers method from leaderboard service. 

Regards,

Himanshu Sharma

answered Jan 30, 2017 by hs00105 (2,005 points)
Hi

I'm using App42 with Corona SDK but there GetUserRanking API doesn't return any ranking, just the score. Is it possible to get the rank without iterating all the users score?

Regards,
Magnus
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
...