ds_map_secure_save

This function will save the contents of the given DS map to a file that is linked to the device it was created on (meaning it can't be read if transferred to any other device). The file itself can have almost any extension (for example, *.dat, *.json, *.bin, etc...) and will be obfuscated and stored to local storage on the target platform. You can then re-load the ds_map using the function ds_map_secure_load(). Note that if the DS map being saved contains an array, this array will be converted into a DS list instead when saved.

IMPORTANT! One of the features of a secure saved file is that it is locked to the device that it was created on, so you cannot load a file saved on one device into a project running on another device.

 

Syntax:

ds_map_secure_save(map, filename);

ArgumentType Description
mapDS Map The id of the data structure to use
filenameString The name of the file to save the map to

 

Returns:

Boolean

 

Example:

ds_map_secure_save(purchase_map, "p_data.dat");

The above code will save the DS map indexed in the variable "p_data" to the given file for later retrieval.