Ds Game Maker Mac

Reads the list data structure from a string.

Roleplayer is a turn-based strategy game maker that features game template, sample game based on the template, a player to the generated games, etc. The games can be generated by the configuration file that already includes other sample games settings for reference. A dsmap is a data structure that stores data in linked pairs consisting of a key and a corresponding value. The dsmap data structure is an exceptionally useful one as it lets you store key and value pairs.

Syntax:

Mac

ds_list_read(id, str [, legacy]);


ArgumentDescription
idThe id of the data structure to read into.
strThe string to read from.
legacy (optional)Can be either true or false or omitted completely.


Ds game maker mac download

Returns: N/A


Description

With this function you can recreate a saved ds_list (one that has previously been written as a string using ds_list_write). You must first create a new ds_list to read the string into, and if the ds_list already exists and has information stored in it, then this will be cleared before reading. This function is of vital importance when creating save/load mechanisms for your game.Note that if the data structure was created with previous versions of GameMaker you should add the optional argument 'legacy', setting it to true as the string format has changed with this version.


Example:

list = ds_list_create();
ini_open('save.ini');
var str = ini_read_string('Lists', '0', ');
if str != '
{
ds_list_read(list, str);
}
ini_close();

The above code creates a list and stores the index in the variable 'list'. It then opens an ini file and reads a string from that, checking to make sure that the string is not returned as empty first. This string is then read into the newly created ds_list.


Next: ds_list_write
© Copyright YoYo Games Ltd. 2018 All Rights Reserved

Ds Game Maker Mac Os X