This function will turn the ds_map data of the specified map into string format which can then be written to an *.ini or a *.txt file for easy storage. This string can then be later read back into a new ds_map using ds_map_read().NOTE: The returned string is not a human readable string, but rather a dump of the contents of the data-structure.
|id||The id of the data structure to use|
t_string = ds_map_write(inventory);
ini_write_string("Saved", "0", t_string);
The above code opens an ini file ready to be written to. It then uses ds_map_write() to generate a string which is stored in the temporary variable "t_string". Finally, it writes that string to the ini file before closing it.