A little help with scoreboard on Windows Phone 8.1 Runtime.

0 votes

Hello.

I am building a simple game and I want to use your service to create a global leaderboard because this API it's simple and user-friendly, but I got stuck when I wanted to show the users because it's a little complicated on runtime...

Here is my code:

public Leaderboard()
{
           App42API.Initialize(Constants.ApiKey, Constants.ApiSecretKey);
            scoreBoardService = App42API.BuildScoreBoardService();
            scoreBoardService.GetTopNRankers(Constants.gameName, 2, new Callback());
}
public class Callback : App42Callback
        {
            //CoreWindow window = CoreWindow.GetForCurrentThread();
            public void OnSuccess(Object response)
            {
                try
                {
                    Game game = (Game)response;
                    for (int i = 0; i < game.GetScoreList().Count; i++)
                    {
                        
                    }
                }
                catch
                {
 
                }
            }
            public void OnException(App42Exception exception)
            {
 
            }
        }

 

The problem is that when I wanted for example to show a messagedialog in OnSuccess callback the game got crashed, also for whatever other element TextLabel, ListBox ... I figured out that there is a little more code that has to be written to get the rankings be shown in a listbox, or in a textlabel... So .. what code shall I write to get my rankings shown on a listbox for exemple? :)

 

Thanks.

asked Mar 7, 2015 in App42 Cloud API-BaaS by mako_edvin (35 points)

1 Answer

0 votes
 
Best answer

Hello Mako,

 

Thanks for your valable feedback.

Please have a look at our sample project  it will help you to print the game result  as a Table text On UI.

Please check and let me know if it helps.

Thanks,

Himanshu Sharma

answered Mar 7, 2015 by hs00105 (2,005 points)
selected Mar 7, 2015 by mako_edvin
Thank you very much. I have been searching a lot these days to find out how should I get a result.
Do let me know if you required any thing from our side. We are happy to serve you.... :)

Thanks,
Himanshu Sharma
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
...