The "array_write" Function

Syntax

array_write(id);
ArgumentTypeDescription
idarrayThe index of a previously-created array to encode as a string

Description

Takes a 1D or 2D array and returns the contents as an encoded string for use with array_read.

The resulting string can also be decoded with ds_grid_read and can be used to convert an array to a ds_grid.

Example

my_array = [0, 1, 2, 3, 4];
str_array = array_write(my_array);