M
Manuelbo
Guest
Hi, i´ve been having trouble executing the level generator program.
I`ve copied everything from this tutorial:
Build Spelunky Level Generator in Gamemaker Part 2
But when I execute it the same message appears every time, please help:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object oLevelCreator:
Push :: Execution Error - Variable Index [3,0] out of range [3,-1] - -1.sections(100012,96000)
at gml_Script_InitializeRoom (line 25) - show_debug_message(string(sections[0, _y]) + string(sections[1, _y]) + string(sections[2, _y]) + string(sections[3, _y]));
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_InitializeRoom (line 25)
called from - gml_Object_oLevelCreator_Create_0 (line 3) - InitializeRoom();
CODE:
/// iniciar habitacion
randomize();
gridSize = 32;
xSections = 4;
ySections = 4;
Sections = [];
sectionTilesX = 10;
sectionTilesY = 8;
sectionWidth = sectionTilesX * gridSize;
sectionHeight = sectionTilesY * gridSize;
room_width = (sectionWidth * xSections) + (gridSize * 2);
room_height = (sectionHeight * ySections) + (gridSize * 2);
for (_y = 0; _y < ySections; _y++)
for(_x = 0; _x < xSections; _x++)
Sections[_x, _y] = 0;
CreateMainPath();
for (_y = 0; _y < ySections; _y++)
show_debug_message(string(sections[0, _y]) + string(sections[1, _y]) + string(sections[2, _y]) + string(sections[3, _y]));
I`ve copied everything from this tutorial:
Build Spelunky Level Generator in Gamemaker Part 2
But when I execute it the same message appears every time, please help:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object oLevelCreator:
Push :: Execution Error - Variable Index [3,0] out of range [3,-1] - -1.sections(100012,96000)
at gml_Script_InitializeRoom (line 25) - show_debug_message(string(sections[0, _y]) + string(sections[1, _y]) + string(sections[2, _y]) + string(sections[3, _y]));
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_InitializeRoom (line 25)
called from - gml_Object_oLevelCreator_Create_0 (line 3) - InitializeRoom();
CODE:
/// iniciar habitacion
randomize();
gridSize = 32;
xSections = 4;
ySections = 4;
Sections = [];
sectionTilesX = 10;
sectionTilesY = 8;
sectionWidth = sectionTilesX * gridSize;
sectionHeight = sectionTilesY * gridSize;
room_width = (sectionWidth * xSections) + (gridSize * 2);
room_height = (sectionHeight * ySections) + (gridSize * 2);
for (_y = 0; _y < ySections; _y++)
for(_x = 0; _x < xSections; _x++)
Sections[_x, _y] = 0;
CreateMainPath();
for (_y = 0; _y < ySections; _y++)
show_debug_message(string(sections[0, _y]) + string(sections[1, _y]) + string(sections[2, _y]) + string(sections[3, _y]));