game_end(ret)

From ENIGMA
Jump to navigation Jump to search

Description

Ends the game and closes the window or wherever the game is running. This function works similar to the Java function System.Exit

Parameters

Parameter Data Type Description
ret integer the value to be returned by the main method where applicable, this parameter is optional and will return 0 by default

Return Values

void: This function does not return anything.

Example Call

// demonstrates closing the game if the escape key is released
if (keyboard_check_released(vk_escape)){
   game_end();
}

// demonstrates closing the game with a return value
game_end(-5);