In GameMaker, you can determine the length of a one-dimensional array using the built-in
array_length_1d function. This function returns the size of the array in terms of the number of elements it contains.
Here is a simple code example illustrating how to use
For two-dimensional arrays, GameMaker also offers the functions
array_width_2d, which return the height (number of rows) and the width (number of columns) respectively. Below is an example of how to find the size of a two-dimensional array:
Note that in GameMaker Studio 2.3 and above, arrays are more dynamic and can have varying lengths for each index when dealing with two-dimensional arrays. Therefore, you might need to loop through each "row" to get the length of each "column" if they are not consistent.