• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker (Solved)Gamemaker throws a error on line that doesn't make sense.

S

Shadowblitz16

Guest
does anybody know why gamemaker is throwing this error..
Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object W_View_Screen:


Unable to find any instance for object index '2' name 'W_ToolBar_Vertical'
 at gml_Object_W_View_Screen_Draw_0 (line 11) -         draw_tile(combo.tileset, combo.tile, 0, x+1+cx.x, y+1+cy);
############################################################################################





C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.0.6.96/windows/Runner.exe exited with non-zero status (-1)
elapsed time 00:02:30.0705836s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.0.6.96/bin/Igor.exe" -options="C:\Users\Shadowblitz16\AppData\Local\GameMakerStudio2\build.bff"  -- Windows Run started at 06/07/2017 13:17:01
FAILED: Run Program Complete
on this line?
Code:
event_inherited()

for (var cy=screen_y; cy<screen_y+screen_height/16; cy++)
for (var cx=screen_x; cx<screen_x+screen_width/16;  cx++)
{
    var combo = Game.combos[# cx, cy];
    if (combo != noone)
        draw_tile(combo.tileset, combo.tile, 0, x+1+cx.x, y+1+cy); //<-- this line
    else
        draw_sprite(spr_null, 0, cx, cy)
}
it doesn't make any sense whatsoever.
I do not reference that object or instance in that line at all it should not be crashing there.

Edit: btw this this is being executed in the draw event of W_View_Screen not W_Toolbar_Vertical
 
S

Shadowblitz16

Guest
Combo objects
Code:
/// Create

tileset     = ts_level;
tileset_len = 16 * 12;

tile         = 32;
tile_orig    = tile;

frame_timer  = 0;
frame_count  = 1;
frame_speed  = 1;
frame_skip   = 0;

pal_sprite = spr_pal_level;
pal_index  = 0;

type = 0;

is_initialized = false
Code:
/// Step

if (!is_initialized) event_user(0);

if (frame_timer >= 0) frame_timer --;
else
{
    frame_timer = frame_speed;
    tile += frame_skip
    if (tile >= (tile_orig + (frame_count * frame_skip))) tile = tile_orig;
}
Code:
//Draw

pal_swap_set(pal_sprite, pal_index, false);
draw_tile(tileset, (tile mod tileset_len), 0, x, y);
pal_swap_reset();
Code:
//User 0

is_initialized = true;

tile_orig    = tile;
 
Top