A
AlexZ
Guest
Hi, I googled and couldnt find anything that'd help me and I really dont know what I'm doing wrong so I made an account here. hope u guys can help me.
I got the following thing:
grid_board = ds_grid_create (10, 10);
var i, i2;
for (i = 0; i < ds_grid_width(grid_board) ; i ++)
{
for (i2 = 0; i2 < ds_grid_height(grid_board); i2 ++)
{
// stuff happens here
};
};
Then I get the following error:
ds_grid_height argument 1 incorrect type (array) expecting a Number (YYGI32)
at gml_Script_scr_setupboard (line x) - for (i2 = 0; i2 < ds_grid_height(grid_board); i2 ++)
idk whats going on, shouldnt ds_grid_height(...) return a number? why does the error message say this is an array? I get the same error when I try to compare ds_grid_width in an if-statement like
"if (i < ds_grid_width(grid_board) - 1) {
//something
};
What am I doing wrong?
thanks in advance for ur help.
I got the following thing:
grid_board = ds_grid_create (10, 10);
var i, i2;
for (i = 0; i < ds_grid_width(grid_board) ; i ++)
{
for (i2 = 0; i2 < ds_grid_height(grid_board); i2 ++)
{
// stuff happens here
};
};
Then I get the following error:
ds_grid_height argument 1 incorrect type (array) expecting a Number (YYGI32)
at gml_Script_scr_setupboard (line x) - for (i2 = 0; i2 < ds_grid_height(grid_board); i2 ++)
idk whats going on, shouldnt ds_grid_height(...) return a number? why does the error message say this is an array? I get the same error when I try to compare ds_grid_width in an if-statement like
"if (i < ds_grid_width(grid_board) - 1) {
//something
};
What am I doing wrong?
thanks in advance for ur help.