ds_map_secure_load_buffer

This function will load a secure saved DS map from a buffer. You must previously have loaded the buffer into memory (using buffer_load) and then passing that into this function will return a DS map populated with the contents of the buffer. Note that the buffer must have been created using the function ds_map_secure_save_buffer for this to work correctly, and also note that if the DS map being loaded contained an array, this will be converted into a DS list instead on load.

NOTE This function is not supported on HTML5.

Usage Notes

 

Syntax:

ds_map_secure_load_buffer(buffer);

ArgumentTypeDescription
bufferBufferThe buffer to load the map data from.

 

Returns:

DS Map or -1 in case the data couldn't be read correctly from the buffer

 

Example:

var _buff = buffer_load("save.dat");
map = ds_map_secure_load_buffer(_buff);
buffer_delete(_buff);

The above code will load a securely saved DS map from a buffer and store its index value in a variable for future use.