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

Legacy GM [Solved] Error message points to event with no code

Anixias

Member
############################################################################################ FATAL ERROR in action number 1 of Draw Event for object obj_ship: DoDiv :2: undefined value at gml_Object_obj_ship_Draw_76 (line 1) - { ############################################################################################

This is the error I am getting. However, I have not defined a draw event, thus it has no code. Running in debug mode, I'm aware of the line 1 "{" character, but how is this a division with an undefined value?! Also, when I added this to the draw event:
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha);
it still gave the same error. Therefore, it isn't trying to draw a non-existent sprite, it's just breaking itself.
 

TheouAegis

Member
Do you delete the sprite that the instance is using? Or any other resources for that matter? What happens if you change the sprite that obj_ship is assigned to use?
 

sp202

Member
Could it be that you're using "with all" or something along those lines and unknowingly causing it to draw stuff?
 

Anixias

Member
Never used with(all), and I found out what it was!

So, basically my game is multiplayer and a client can send a ship they've made in the workshop to the server. The server then checks it out, makes sure it is safe for space travel, and then creates a sprite from a surface and sets sprite_index to this new sprite. Now, that doesn't give the server this error. The error occured when the server synced ships, because it synced sprite_index as well (because thruster fire was part of the default ship's animation, but a different sprite than its idle). So, basically, my server said the ship had a sprite_index that wasn't pointing to a built-in resource, so clients always crashed.
 
Top