Can't post score in...
 
Notifications
Clear all

Can't post score in a leaderboard

4 Posts
2 Users
0 Reactions
1,048 Views
(@silverddx)
Posts: 6
Active Member
Topic starter
 

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

 

 

 

 

 

 
Posted : 09/10/2019 1:16 pm
(@skaredcreations)
Posts: 805
Prominent 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

 
Posted : 10/10/2019 1:09 pm
(@silverddx)
Posts: 6
Active Member
Topic starter
 

Hello,

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

Thank you !

 
Posted : 11/10/2019 12:04 pm
(@skaredcreations)
Posts: 805
Prominent 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

 
Posted : 11/10/2019 3:33 pm
Share: