SC_Client_CreateChallenge()
Creates a new challenge.
Synopsis:
#include <scoreloop/sc_client.h>
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)
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:
libscoreloopcoreDescription:
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).