Sign In Register

How can we help you today?

Start a new topic
Answered

Unable to accept public challenge

Hello 


I'm trying to get some simple form of matchmaking up and running, which involves creating a public challenge, and then having some other use join that challenge.


I can create the challenges without any problems, however whenever another use attempts to join said challenge I get an error as follows:


challengeInstanceId = INVALID  | (The ID does not match a challenge the user is involved with)


Shouldn't everyone be able to accept public challenges? The challenge state is "ISSUED" so it is not because the challenge already has been accepted. I also have the same problem from the test harness.


Thanks in advance




Best Answer

Player 1

 {

 "@class": ".CreateChallengeResponse",
 "challengeInstanceId": "552e1056e4b0e4d939d9b0da",
 "scriptData": null
}
{
 "@class": ".CreateChallengeRequest",
 "accessType": "PUBLIC",
 "challengeShortCode": "ASYNC_CHALLENGE",
 "endTime": "2015-12-31T12:00Z",
 "maxAttempts": 3,
 "maxPlayers": 2,
 "minPlayers": 2,
 "silent": false
}



Player 2


{
 "@class": ".JoinChallengeResponse",
 "scriptData": null
}

{
 "@class": ".JoinChallengeRequest",
 "challengeInstanceId": "552e1056e4b0e4d939d9b0da",
 "eligibility": {
  "segments": {
   "segment1": "value1",
   "segment2": "value2"
  }
 },
 "message": "message"
}



I'm able to login in successfully. Please let me know if you have any other params you have when requesting?

Btw I assume you are using Join instead of Accept for public challenges , which is the right way.





Answer

Player 1

 {

 "@class": ".CreateChallengeResponse",
 "challengeInstanceId": "552e1056e4b0e4d939d9b0da",
 "scriptData": null
}
{
 "@class": ".CreateChallengeRequest",
 "accessType": "PUBLIC",
 "challengeShortCode": "ASYNC_CHALLENGE",
 "endTime": "2015-12-31T12:00Z",
 "maxAttempts": 3,
 "maxPlayers": 2,
 "minPlayers": 2,
 "silent": false
}



Player 2


{
 "@class": ".JoinChallengeResponse",
 "scriptData": null
}

{
 "@class": ".JoinChallengeRequest",
 "challengeInstanceId": "552e1056e4b0e4d939d9b0da",
 "eligibility": {
  "segments": {
   "segment1": "value1",
   "segment2": "value2"
  }
 },
 "message": "message"
}



I'm able to login in successfully. Please let me know if you have any other params you have when requesting?

Btw I assume you are using Join instead of Accept for public challenges , which is the right way.




You are completely right. I was using AcceptChallengeRequest instead of JoinChallengeRequest. 


Thanks a lot for the help, much appreciated :)

Nice, I was a bit doubtful when you used "Join" instead of "Accept". So, I assumed you are using it right :P

However, great that you sorted it out!


Thanks,

Ayyappa.