Country Leaderboards

0 votes


We currently have a friends & world leaderboard. But i am wondering if we also can do this on country level.

if i am right it is something to do with:


sp = AppConstant.GetServce();
scoreService = AppConstant.GetScoreService(sp);
Dictionary<string, object> jsonDoc = new Dictionary<string, object> ();  
scoreService.AddJSONObject("country", jsonDoc); 
scoreService.SaveUserScore(AppConstant.GameName, fbusername, Convert.ToDouble(score), this);


sp = AppConstant.GetServce();
scoreService = AppConstant.GetScoreService(sp);
Query query = QueryBuilder.Build("country", FBprofile["country"], Operator.EQUALS);
scoreService.SetQuery("country", query);
scoreService.GetTopNRankers(AppConstant.GameName, 20,this);

But for some reason it shows all highscores, i checked the database it saves the country in the database. So the saving part goes good but the loading part doesnt work at the moment.

Thanks for your time.

With kind regards,
Vasco Rouw

asked Jun 20, 2014 in App42 Cloud API-BaaS by VascoGames (16 points)

1 Answer

+1 vote
Best answer

use scoreService.GetTopNTargetRankersinstead of GetTopNRankers

See this


answered Jun 20, 2014 by ajay123 (899 points)
selected Jun 20, 2014 by VascoGames
Thank you very much Ajay123. I missed that one lol.

But now i have the next problem , i cannot find GetUserTargetRanking.
For example on the global leaderboards we use GetUserRanking. If the user is on place 123 it will show the rankings from 120 till 140.

Do you know a solution on that ?

With kind regards,
Vasco Rouw
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