Can't post score in a leaderboard  

  RSS
(@silverddx)
New Member Registered

Hi,

I'm having trouble trying to post a score using CombuManager.platform.ReportScore

When using my function I always get a "fail" callback.

Here's my code :

public void PostScore()
{
string score = userScore.ToString();

CombuManager.platform.ReportScore(score, "3", CombuManager.localUser.userName, (bool success) => {
if (success)
{
Debug.Log("Score registered");
}
else
{
Debug.Log("Score fail");
}
});
}

In the admin interface, the ID of the leaderboard is 3. When I launch my scene, the server connection is working fine. localUser seems to be authentificated.

Apart from that I get no error. My leaderboard remains empty.

 

Thank you for your time

 

 

 

 

 

Quote
Posted : 09/10/2019 2:16 pm
(@skaredcreations)
Honorable Member Admin

Edit the script CombuPlatform and before calling the callback (should be at line 403) add a line to print the variable "error" in the console log so you can see why it's not succeeding: Debug.Log("error: " + error);

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/10/2019 2:09 pm
(@silverddx)
New Member Registered

Hello,

My code is working now for some reason. I don't really know how I solved it, but it's done.

Thank you !

ReplyQuote
Posted : 11/10/2019 1:04 pm
(@skaredcreations)
Honorable Member Admin

Ok nice, anyway I will add an overload to ReportScore methods to add also a callback that returns both bool success and string error, so it'll be easier to catch up what's going wrong.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 11/10/2019 4:33 pm
Share: