我目前正在制作一款在线游戏,一款简单的游戏,这是我第一次使用SDLNet。我在考虑每个客户端向服务器发送带有位置的结构,并将服务器句柄发送给其他客户端。当tryng发送包含向量的结构时,会出现问题。如果结构只包含整数,则不存在任何段错误。我将留下一些代码:
bash $ **bl create -n testingcustom**
IBM Bluemix Live Sync CLI V1.0.7 (c) 2015 IBM Corp.
Fetching Bluemix info ...2016-02-22 22:33:41.009 bl[22874:381799] ***
Terminating app due to uncaught exception 'NSRangeException', reason:
'*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty
array'
*** First throw call stack: ( 0 CoreFoundation 0x00007fff847a003c __exceptionPreprocess + 172 1 libobjc.A.dylib
0x00007fff8d16d76e objc_exception_throw + 43 2 CoreFoundation
0x00007fff846691e4 -[__NSArrayM objectAtIndex:] + 260 3 bl
0x0000000102ae906d -[Create execute] + 3952 4 bl
0x0000000102ae27fa -[Command run:] + 253 5 bl
0x0000000102ad54c3 main + 385 6 libdyld.dylib
0x00007fff8d39b5c9 start + 1 7 ???
0x000000000000000a 0x0 + 10 ) libc++abi.dylib: terminating with
uncaught exception of type NSException Abort trap: 6