Ç
Çağrı
Guest
Insıde obj_RoomState;
-Create-
RoomGrid = ds_grid_create(5, 5);
ds_grid_set_region(RoomGrid,0,0,4,4,"aaa")
//RoomGrid[1, 0] = "aaa";
RoomGrid[2, 2] = room1;
RoomGrid[3, 2] = room3;
RoomGrid[3, 3] = room2;
RoomGrid[2, 3] = room4;
-Draw-
draw_text(x,y,RoomGrid[1, 0])
When i run the game i get this error:
But when i run it like this:
-Create-
RoomGrid = ds_grid_create(5, 5);
ds_grid_set_region(RoomGrid,0,0,4,4,"aaa")
RoomGrid[1, 0] = "aaa";
RoomGrid[2, 2] = room1;
RoomGrid[3, 2] = room3;
RoomGrid[3, 3] = room2;
RoomGrid[2, 3] = room4;
It works...
Im somewhat new to game maker so my question is this
ds_grid_set_region(RoomGrid,0,0,4,4,"aaa")
RoomGrid[1, 0] = "aaa";
Shouldn't First line set All the grid and RoomGrid[1,0] to "aaa" why it gives an error when i delete the second line
-Create-
RoomGrid = ds_grid_create(5, 5);
ds_grid_set_region(RoomGrid,0,0,4,4,"aaa")
//RoomGrid[1, 0] = "aaa";
RoomGrid[2, 2] = room1;
RoomGrid[3, 2] = room3;
RoomGrid[3, 3] = room2;
RoomGrid[2, 3] = room4;
-Draw-
draw_text(x,y,RoomGrid[1, 0])
When i run the game i get this error:
But when i run it like this:
-Create-
RoomGrid = ds_grid_create(5, 5);
ds_grid_set_region(RoomGrid,0,0,4,4,"aaa")
RoomGrid[1, 0] = "aaa";
RoomGrid[2, 2] = room1;
RoomGrid[3, 2] = room3;
RoomGrid[3, 3] = room2;
RoomGrid[2, 3] = room4;
It works...
Im somewhat new to game maker so my question is this
ds_grid_set_region(RoomGrid,0,0,4,4,"aaa")
RoomGrid[1, 0] = "aaa";
Shouldn't First line set All the grid and RoomGrid[1,0] to "aaa" why it gives an error when i delete the second line