|id||The DS map ID value.|
|buffer||The buffer ID value.|
Returns: Ds_map Index
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.
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.