NSpPlayer_GetEnumeration
You can use theNSpPlayer_GetEnumeration
function to take a snapshot of each player in your game.
OSStatus NSpPlayer_GetEnumeration ( NSpGameReference inGame, NSpPlayerEnumerationPtr *outPlayers);
inGame
- An opaque reference to your game object.
outPlayers
- A pointer to a player enumeration structure which is allocated and set by NetSprocket.
- function result
- A result code of
noErr
, or a NetSprocket or Open Transport result code.DESCRIPTION
NSpPlayer_GetEnumeration
places the information on each player in the player enumeration structure. This structure is made available to your game viaNSpPlayerEnumerationPtr
.It is important to release the memory held by the player enumeration structure by calling the
NSpPlayer_ReleaseEnumeration
function when you are done.NetSprocket returns an error if there was a problem getting the player information.