I am occasionally receiving the following error when I try to send a turn in a Sandbox Game Center turn based play game.
Error Domain=GKErrorDomain Code=23 "The requested operation could not be completed because the specified participant does not have the required turn state." UserInfo=0x209e5110 {GKServerStatusCode=5103, NSUnderlyingError=0x209e56b0 "The operation couldn’t be completed. status = 5103, Session: 4d278ed6-d546-4d31-bb6f-0a4ae89873aa current turn: 8 isn't as expected: 1", NSLocalizedDescription=The requested operation could not be completed because the specified participant does not have the required turn state.
The 'current turn' and 'expected' numbers differ. I am sending between two devices, one with iOS5 and one with iOS6. I have accounted for the depreciation of the old call using the following line:
if([match respondsToSelector:@selector(endTurnWithNextParticipants:turnTimeout:matchData:completionHandler:)]){
[match endTurnWithNextParticipants:@[nextParticipant] turnTimeout:inval matchData:data completionHandler:completeEndTurn];
}
else{
[match endTurnWithNextParticipant:nextParticipant matchData:data completionHandler:completeEndTurn];
}
The input parameters 'look' to be correct i.e I can't see any clear errors. However, I don't really understand the error message. I have attempted to find more via searching but can't find anything that explains the error. Apple docs just has the text that is given in the message. Can anyone point me to a place which explains the error in more detail? Also, does the 'state' mean the participant 'status' on the other device?
Thanks.