Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Scoreloop

Reply
Contributor
josempans
Posts: 14
Registered: ‎01-20-2013
My Device: Playbook

Challenge winner is not correct

[ Edited ]

I've read:

 

Scores can be sorted in ascending or descending order.

  • Descending order: Highest score is on top.
  • Ascending order: Lowest score is on top. E.g., the fastest user wins a game; sorting as time.

 

I've already set the scores for: Level -> Descending, Result -> Ascending. The challenge winner is who made less moves; but I always receive the winner as the one who made more steps, why is this happening? What am i doing wrong?

 

SC_Challenge_h theChallenge = SC_ChallengeController_GetChallenge(scChallengeController);
unsigned int level = SC_Challenge_GetLevel(theChallenge);
unsigned int stage = SC_Challenge_GetMode(theChallenge);
double movesContender = SC_Score_GetResult(SC_Challenge_GetContenderScore(theChallenge));
double movesContestant = SC_Score_GetResult(SC_Challenge_GetContestantScore(theChallenge));
SC_User_h thewinner = SC_Challenge_GetWinner(theChallenge);
winnerstr = SC_String_GetData(SC_User_GetLogin(thewinner));

 

 

 EDIT: The problem is other: I just receive always the same winner (the contestant)... What am i doing wrong? I get correct values for getContenderScore() and getContestantScore(), why I'm not getting the correct winner?

 

EDIT 2: This is a console log:

Challenge contender: Moves: 10
Challenge contestant: Moves: 12
Level: 2 Stage: 1
Winner: PLAYER 1
Loser:smileytongue:LAYER 2
contender: PLAYER 2
contestant: PLAYER 1

BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve

Re: Challenge winner is not correct

Hi,

 

I am not able to figure out anything wrong in what you are doing. I looked up your game Lookebox Challenge! on developer.scoreloop.com and everything looks fine. It could be a potential server side issue. We need to do some testing here to confirm that it is a server side issue.. We will look into it and get back to you.

 

Thanks,

Prenitha

Contributor
josempans
Posts: 14
Registered: ‎01-20-2013
My Device: Playbook

Re: Challenge winner is not correct

Any advances with this?

Contributor
josempans
Posts: 14
Registered: ‎01-20-2013
My Device: Playbook

Re: Challenge winner is not correct

Prenitha, could you please check our discussion at scoreloop support? I'm having a lot of issues with the challenges, and even with the Blackberry "Games" application accounts that I use for testing.

BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve

Re: Challenge winner is not correct

Hi,

 

I took a look at the Scoreloop Support thread. There are two issues that you have pointed out (challenge winner wrong case and SC_REQUEST_FAILED). We checked the games app and we do not see SC_REQUEST_FAILED in a few other games we tried out. It seems to be specific to your game. Tickets have been opened for both issues. Both problems are under investigation  with the server team. I will update you as soon as I have some news for you.

Thank you for your understanding..

Best Regards,
Prenitha

BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve

Re: Challenge winner is not correct

Hi,

 

The SC_REQUEST issue has been resolved.

The issue with the challenge winner is due to the fact that the level of the challenges is not set correctly. Did you get a chance to investigate if you are setting up the levels correctly ?

 

Thanks,

Prenitha

BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve

Re: Challenge winner is not correct

Hi,

 

Is there any update on if you are setting the levels correctly ? Do you still see issues ?

 

Thanks,

Prenitha

Contributor
josempans
Posts: 14
Registered: ‎01-20-2013
My Device: Playbook

Re: Challenge winner is not correct

No, I just don't know where the error is; but if I found the issue I'll let you know.

Is weird because the information I get when I retrieve the level from Scoreloop, is correct. The players play the same level (I tested with the simulator and my device), I have the correct number of moves from the contender, etc. But when I ask for the winner, I get a wrong answer... so, I'll keep looking.

 

THANKS