• 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!

Probably A Bug in GMS 2.3

Petrik33

Member
First of all I am not sure If I should write it here. Seconadary, I am not sure if it's a bug, but it really seems to.The problem came after I tried to implement drawing order system like in the Friendly Cosmonaut Tutorial (
). But after I have finished nothing have happened. Of course it can be my mistake somewhere as my code differs a little in some places, but not in this particular. To be short I will send screenshots of My Debugger Working in the Script:
See, the debugger passes the whole script with 2 lines(I was pressing the simple one step button as always and it worked properly before). So really, the debugger starts on the first line of function and ends on the one before the last. So I ahve decided to check if it was my trouble and deleted "If statement". And I got Exactly the same situation. Then I have even added show_debug_message("!!!!!"), and still, it didn't appear in the Log while the debugger was stopping every step on this script.
If I run the game without debugger, it just doesn't draw anything, here is the drawing code (but I don't think the trouble is here, even if the mistake exists in this code):
GML:
//The Drawing Order Grid is created in the script I have attached
//On screenshot and that script takes place in the pre-draw event of all objects
if(ds_exists(drawing_order_grid,ds_type_grid))
{
    //Sort Grid By Bbox Bottom
    ds_grid_sort(drawing_order_grid,1,true);
    for(var _id = 0; _id < ds_grid_height(drawing_order_grid); _id++)
    {
        var _toDraw = drawing_order_grid[# 0,_id];
        draw_sprite(_toDraw.sprite_index,_toDraw.image_index,_toDraw.x,_toDraw.y);  
    }
    ds_grid_destroy(drawing_order_grid);
}
I am really stuck! Help please and fix this bug if it is please.

Edit: the code from the screenshot also had one flow, which should have led to the error, but it didn't, after I have fixed it nothing have changed(The variable grid_height isn't set if the ds_grid doesn't exist)
 

Attachments

Last edited:

TheouAegis

Member
What is global.oRenderer?

I have three guesses. The first is global.oRenderer points to a non-existent entity. The second is only one instance is getting added to the grid. The other theory is multiple grids are getting created, each with only one instance.
 

Petrik33

Member
What is global.oRenderer?

I have three guesses. The first is global.oRenderer points to a non-existent entity. The second is only one instance is getting added to the grid. The other theory is multiple grids are getting created, each with only one instance.
Man, I have seen, your answer after hitting myself thrice as strong as I can , yes you are right and I have found it out myself and then went here as soon as possible to delete this thread:) how silly it was to think on the GMS, I typed o.Renderer instead of o.Render. OMG, the most ashamed occasions I have ever get to:( Thank you very much, and sorry everybody for this shame!

Edit: You know, what is the funniest, I was in such a hurry to delete this thread, as I haven't even checked, but now I have done it, and actually the object was called properly, so it's probably one of the other options you wrote about, but I am not sure
 
Last edited:
Top