#call function that sits in draw end from step

13 messages · Page 1 of 1 (latest)

urban ether
#

show the error

sonic wave
#
ERROR in
action number 1
of  Step Event0
for object obj_graph:

Variable <unknown_object>.drawGraph(100006, -2147483648) not set before reading it.
 at gml_Object_obj_graph_Step_0 (line 3) -        drawGraph();
############################################################################################
gml_Object_obj_graph_Step_0 (line 3)
urban ether
#

show me where you define drawGraph()

sonic wave
#
***Draw End***
//draw
function drawGraph() {
    draw_sprite(spr_point,0,nx,ny);
}```
urban ether
#

youre calling it in step and defining it in draw end?

sonic wave
#

yes

urban ether
#

you cannot draw in step events

sonic wave
#

I know thats the problem

urban ether
#

you should define it in a create event

sonic wave
#

I see

#

then call it in draw end?

urban ether
#

yes

sonic wave
#

yes it works now, ty