【发布时间】:2018-12-10 05:33:07
【问题描述】:
我正在尝试使用 Game Center 创建一个实时多人游戏。对于配对,我使用以下代码使用编程方法:
[[GKMatchmaker sharedMatchmaker] findMatchForRequest:request withCompletionHandler:^(GKMatch *match, NSError *error) {
if (error)
{
// Process the error.
NSLog(@" error => %@ ", [error userInfo] );
}
else if (match != nil)
{
NSLog(@"Match Found _-----------");
currentMatch = match;
match.delegate = self;
NSLog(@"Expected player count:%ld",match.expectedPlayerCount);
if ( match.expectedPlayerCount == 0)
{
NSLog(@"Ready to start match!");
}
}
}];
目前,当找到匹配时,代码会生成以下错误:
ABC-mobile[342:26698] [log] [ERROR] ReXmitCollectionRequest:640 /BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1020.31/ICE.subproj/Sources/ICEMessage.c:640: ReXmit [SNATMAP_REQUEST] (1:0) from [192.168.0.104:16402] to [17.133.234.32:16384] failed (801A0002)
ABC-mobile[342:26698] [log] [ERROR] -[GKConnectionInternal internal_setRemoteConnectionData:fromParticipantID:pendingConnectionPIDList:]:1041 GCKSessionPrepareConnection FAILED(80150016)
我正在使用 Cocos2D-X 游戏引擎,并从 C++ 函数调用此方法。
我将不胜感激有关此主题的任何建议和想法。谢谢。
【问题讨论】:
标签: objective-c cocos2d-x game-center