This function writes the data from a ds_map as a string.


GML Code Example


Argument Description
id The id of the data structure to use

Returns: String


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


GML Code Example

 var t_string;
 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.

Back: DS Maps

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here