I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: DaLoller on March 23, 2018, 12:04:58 PM

Title: what to use for t in yoyoyo engine 1.51?
Post by: DaLoller on March 23, 2018, 12:04:58 PM
so i just got into making fangames, and wanted to start off with a simple avoidance test. i was using klazen's dev tutorial and patrickgh3's avoidance tutorial. i got to the introduction to t (timer). when i tried to use that in gms, it always gave me an error. here's the code i got as of yet:
Code: [Select]
if not instance_exists(objPlayer) {
scrStopMusic();
}

if instance_exists(objPlayer) {
timer+=1;
}

i couldn't really find a solution for it myself so i'm asking here.
here's the error code if someone needs it:
Code: [Select]
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of  Step Event0
for object objAvControl:

Variable objAvControl.timer(100140, -2147483648) not set before reading it.
 at gml_Object_objAvControl_Step_0 (line 6) -        timer+=1;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_objAvControl_Step_0 (line 6)
edit: nevermind patrick already helped me