• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android [SOLVED] surfaces crashing

DaDonMike

Member
i'm getting this error when i minimise the game in windows or come out and back into the game on android..
___________________________________________
############################################################################################
ERROR in
action number 1
of Draw Event
for object obj_sys_lighting:

Trying to use non-existing surface.
at gml_Object_obj_sys_lighting_Draw_0 (line 3) - draw_surface(light,camera_get_view_x(view_camera[0]),camera_get_view_y(view_camera[0]));
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_sys_lighting_Draw_0 (line 3)


EDIT: iv got it working myself now.. had to ask if surface exists first..
Code:
if !surface_exists(light)
{
    light = surface_create(camera_get_view_width(view_camera[0]),camera_get_view_height(view_camera[0]));
}
else
{
    gpu_set_blendmode(bm_subtract);
    draw_surface(light,camera_get_view_x(view_camera[0]),camera_get_view_y(view_camera[0]));
    gpu_set_blendmode(bm_normal);
}
 
Last edited:
Top