This function will save a previously created DS map to a buffer. You supply the DS map ID value (as returned by the function ds_map_create) and the ID of the buffer to write to (as returned by the function buffer_create). Note that if the DS map being saved contains an array, this will be converted into a DS list instead when saved.IMPORTANT! The secure saved DS map file can only be loaded on the device that created it, and if you try to load a file that was saved on a different device, then it will not work.
|id||The DS map ID value.|
|buffer||The buffer ID value.|
Integer (DS map index)
buff = buffer_create(128,buffer_grow,4);
var map = ds_map_create();
The above code will create a buffer and a DS map, then populate the map with some values and write it to the buffer before deleting the map.