Initialization And Deinitialization – Giavapps Game Jolt API

 

About Initialization And Deinitialization Functions

 

You must call gj_init() before any other function from Giavapps Game Jolt API Extension. You must also call gj_deinit() for deinitializing the Extension and free memory occupied.

 

Initialization And Deinitialization Functions

 

gj_init(string game_id, string private_key) Initializes Giavapps Game Jolt API Extension and all local variables. Please note that this function also stores the Game ID and Private Key values inside gj_game_id and gj_private_key local variables. You can find these values on http://gamejolt.com under Dashboard > Your Games > (Select Your Game) > Game API > API Settings.

string game_id: the Game ID of the game.

string private_key: the Private Key of the game.

 

gj_deinit() Deinitializes Giavapps Game Jolt API Extension and frees memory occupied.

 

Local Variables

 

Once you called gj_init() function you gain access to the following local variables:

string gj_game_id contains the Game ID. (Default: "")

string gj_private_key contains the Private Key. (Default: "")

string gj_username contains the User Name. (Default: "")

string gj_user_token contains the User Token. (Default: "")

double gj_alarm_id contains the id of the Alarm that will be used for pinging an open Session. (Default: 0)

double gj_alarm_time contains the number of steps for the Alarm that will be used for pinging an open Session. (Default: 30*room_speed)

string gj_success contains the result data of the success field received when sending HTTP requests to the Game Jolt API. (Default: "false")

string gj_message contains the result data of the message field received when sending HTTP requests to the Game Jolt API. (Default: "")

 

Code Examples

 

Initializing And Deinitializing Giavapps Game Jolt API Extension

 

Create Event

 

gj_init("game_id","private_key");//Initializes Giavapps Game Jolt API

 

Game End Event

 

gj_deinit();//Deinitializes Giavapps Game Jolt API

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Comments are closed.