ds_grid_add

This function can be used to add a given value (real or string) to the value of the given cell within the grid. The value to be added must be the same type as that held within the grid cell, ie: you cannot add a string to a real or vice-versa, and for strings this corresponds to concatenation.

 

Syntax:

ds_grid_add(index, x, y, val);

ArgumentTypeDescription
indexDS GridThe index of the grid.
xRealThe x position of the cell in the grid.
yRealThe y position of the cell in the grid.
valAnyThe value to add to the cell.

 

Returns:

N/A

 

Example:

ds_grid_add(grid, 5, 5, 6)

This would add 6 to the given cell within the DS grid referenced by the variable "grid".