sakeGetRandomRecord

GameSpy SDK

sakeGetRandomRecord

Retrieves a random record from the provided search criteria.

SAKERequest sakeGetRandomRecord(
SAKE sake,
SAKEGetRandomRecordInput * input,
SAKERequestCallback callback,
void * userData );
RoutineRequired HeaderDistribution
sakeGetRandomRecord<sake.h>SDKZIP

Return Value

Reference to internal object that tracks the request. If this is NULL, then the request has failed to initialize. You can call sakeGetStartRequestResult to obtain the reason for the failure.

Parameters

sake
[in] The sake object.
input
[in] Stores the info for the random record search.
callback
[in] The request callback function.
userData
[in] pointer to user specified data sent to the request callback.

Remarks

The output will always be a single record (unless no records pass the filter, in which case the output will contain NULL data for the returned record). Note that this function works best in a table in which records are not deleted or are deleted in order of oldest first (in other words, tables where recordids are contiguous).