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

(SOLVED) Trying to draw non existing sprite

Okay this is weird.
I opened up a new project,
imported a sprite called SPR_Sprite
then imported a sprite called SPR_OBJECT
made an object in which the draw event states:

draw_sprite_general(SPR_Sprite, ….rest of variables)

The object has the sprite SPR_OBJECT assigned to it, and the object is set to visible. I do this so i can easily see where the object is in the room editor, but the actual sprite ingame is the one drawn in the draw event.


It always crashes! Error : "Trying to draw non-existing sprite in draw event draw_sprite_general(SPR_Sprite.....)

Meaning it can't find the sprite, yet it's there, I know it is because I imported it and named it that way.

However, when I import ANOTHER sprite, rename the original SPR_Sprite to something else, and name the new one SPR_Sprite (with the correct imported sprite like before)


It works!
The code did not change, the object properties did not change. The draw event still draws an "SPR_Sprite".


My conclusion seems to be that Game Maker flat out IGNORES the very first sprite you imported…
At least that's what's happening here. The code did not change, the object properties did not change.
The only thing that changed is that I created another SPR_Sprite, and renamed the first one I imported.
If this is the case, this could be bad, as I got a much larger project in the works and there's no way I remember what the first sprite imported was... Could be an important one.

This is just too bizar...

EDIT:
The very first sprite I imported automatically got flagged as "set to no export" and I'm sure that's the issue.
 
Edit: I also made that SPR_Sprite the resource of a tileset called "TIL_Sprite",
and somehow in that tileset the "set to no export" was flagged. I unchecked it and now it works…
Very weird :/

I'll leave this here just in case someone else has the same problem.
 
Top