game_save_id

This read-only variable points to the area of local storage that is reserved for your game on the target device. See Save Area Locations.

In general, you do not need to use this to write or read files in the save area, as GameMaker automatically resolves paths to the save area when reading/writing files. For example, this:

buffer_save(buf, game_save_id + "my_file.dat");

would be better done as just this:

buffer_save(buf, "my_file.dat");

This directory may or may not be visible to other applications, depending on the platform.

NOTE On the HTML5 target it will return an empty string.

Read: The File System

 

Syntax:

game_save_id

 

Returns:

String

 

Example:

save_dir = game_save_id;

This will store the directory for saving files to a variable for future use.