How can I use multi leaderboards in a project?

0 votes

My project has 3 small games inside. Each game has its own leaderboard (I hope).

I think this code in FBLeaderboard in the sample project handles this matter.

public void SaveScoreForFacebookUser(string userIdstring score) {

...

scoreBoardService.SaveUserScore(constants.GameNameuserIdConvert.ToDouble(score), saveCallback);

}

But I can't find how to set game names to the variable. 

Am I right?  If so, how can I do that?

If I'm wrong, can I do that with App42?

 

 

asked Mar 24, 2014 in App42 Cloud API-BaaS by David Kim (20 points)

1 Answer

0 votes

Yes you can save the score for your individual games, for this Just create three individual games with App42, and save scores accordingly. 

Like :

scoreBoardService.SaveUserScore("GameName1"userIdConvert.ToDouble(score), saveCallback);

scoreBoardService.SaveUserScore("GameName2"userIdConvert.ToDouble(score), saveCallback);

scoreBoardService.SaveUserScore("GameName3"userIdConvert.ToDouble(score), saveCallback);

answered Mar 24, 2014 by Akshay.Mishra (179 points)
Thank you for your answer^^ I'll try that of course.
I have a space in the game names. Is that OK? I will see what happens.^^
I also wonder how to read them separately. Probably there is a solution in the source for that.
Spaces in game name is OK.
But what do you mean by read them separately, if you want to fetch scores according to different game names, then just pass the game name for which you want to fetch scores.
That's what I wanted to know. Thanks again!!!!
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
...