cloud_string_save(string, description);
Argument | Description |
---|---|
string | The data string to be uploaded. |
description | A brief description of the data being stored. |
Returns: Real
This function will commit a string to the chosen cloud service
for storage. The function will return a unique id value that
should then be used in the appropriate asynchronous event to
identify the ds_map that is returned as a "call back" from the
cloud service. The string should contain all the information
that you need to save for your game as you can only store one
single "data blob" to the cloud, and running this function again
will overwrite any previously stored values (as will using the
cloud_file_save
function). The description should be a short string of information
that describes the save, eg: "Level2, Stage2".
For further information on the returned asynchronous data, please
see the function cloud_synchronise.
var t_str = "";
for (var i = 0; i < 10; i++;)
{
t_str += string(global.Highscore[i]) + "|"
}
save_check = cloud_string_save(t_str, "Current Highscores");
var file = file_text_open_write("Highscores.txt");
file_text_write_string(file, t_str);
file_text_close(file);
The above code creates a string from the values stored in the global array "Highscores" and then writes this string to the cloud service for storage, as well as writing it to a file for local storage.