SC_Client_CreateChallenge()

Creates a new challenge.

Synopsis:

#include <scoreloop/sc_client.h>
 
SC_DEPRECATED SC_PUBLISHED SC_Error_t SC_Client_CreateChallenge(SC_Client_h self, SC_Money_h stake, SC_User_h contestant, unsigned int mode, unsigned int level, SC_Challenge_h *pChallenge)

Since:

BlackBerry 10.0.0

Deprecated in BlackBerry 10.3.0

Arguments:

self

Opaque handle for the current client instance.

stake

The challenge stake. Valid stakes can be retrieved from the current session (use the current session user's SC_Session_GetBalance()). This value cannot be NULL.

contestant

The challenge contestant. Passing a NULL value here creates an open challenge that can be accepted by any player.

mode

The mode for the challenge.

level

The level for the challenge.

pChallenge

Opaque handle for the SC_Challenge object that will be created.

Library:

libscoreloopcore (For the qcc command, use the -l scoreloopcore option to link against this library)

Description:

This method sets the session user as the challenge contender. The challenge contestant is the User object passed as a method argument. To create an open (non-assigned) challenge, pass a NULL value as the contestant argument. Challenges must be instantiated with a challenge stake chosen by the contender.

Returns:

SC_Error_t A return code (A value of SC_OK indicates success, any other value indicates an error).

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus