SC_Client_New()

Creates a new instance of SC_Client.

Synopsis:

#include <scoreloop/sc_client.h>
 
SC_Error_t SC_Client_New(SC_Client_h *pSelf, SC_InitData_t *initData, const char *gameIdentifier, const char *gameSecret, const char *gameVersion, const char *currency, const char *languages)

Arguments:

pSelf

A pointer to the SC_Client struct.

initData

A pointer to the SC_InitData struct. The initData variable has to have the same lifetime as the client variable.

gameIdentifier

The unique game identifier assigned by Scoreloop when the game was registered on https://developer.scoreloop.com.

gameSecret

The unique game secret assigned by Scoreloop when the game was registered on https://developer.scoreloop.com.

gameVersion

The version of the game in the format "<MajorVersion>.<MinorVersion>", e.g. "1.0". In the case of a wrong format SC_INVALID_ARGUMENT is returned.

currency

The unique game specific currency code assigned by Scoreloop when the game was registered on https://developer.scoreloop.com.

languages

A comma-separated list of languages the game supports. e.g., for English, pass "en". This parameter is mandatory if the game supports localization of Awards. The current language on the device is intersected with the given list and all Scoreloop supported languages. If an intersection is found, the intersected language will be used. If there is no intersection the first language from the given list is used. English ("en") will be used if NULL is passed. Example: List of languages supported by game: ['en', 'en_US', 'de', 'pl']

Current Language of OS

Language used

'en_US'

'en_US'

'en_UK'

'en'

'pl_PL'

'pl'

'de'

'de'

'it'

'en'

Note that the awards bundle needs to be localized to all given languages.

Library:

libscoreloopcore

Description:

This method creates the SC_Client instance and initializes it. It initializes the PAL Context and creates a session (with the new game object created). The game object is created with the ID, secret and currency passed as input parameters to this method.

Returns:

SC_Error_t A return code (A value of SC_OK indicates success, any other value indicates an error. For more error codes see here).

Last modified: 2013-12-23

comments powered by Disqus