ds_priority_write

Writes the data structure to a returned string. This enables the structure to be saved in something like an .ini file for future use.

语法:

ds_priority_write(id);


参数 描述
id The id of the data structure to check.


返回: String(字符串)


描述

This function returns a string which can then be stored or transferred to another data structure using the ds_priority_read function.

NOTE: The returned string is not a human readable string, but rather a dump of the contents of the data-structure


例如:

var str;
ini_open("save.ini");
str =ds_priority_write(p_queue);
ini_write_string("P_Queues", "0", str);
ds_priority_clear(p_queue);
ini_close();

The above code opens an ini file and then writes a string containing the information stored in the ds_priority queue indexed in the variable "p_queue". The priority queue is then cleared and the ini file closed.


上一页: DS Priority Queues
下一页: ds_priority_create
© Copyright YoYo Games Ltd. 2018 All Rights Reserved