Adds a value to a cell in a grid.


GML Code Example

ds_grid_add(index, x, y, val);

Argument Description
index The index of the grid.
x The x position of the cell in the grid.
y The y position of the cell in the grid.
val The value to add to the cell.

Returns: N/A


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.


GML Code 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".

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