I Wanna Community

what to use for t in yoyoyo engine 1.51?

0 Members and 1 Guest are viewing this topic.

Offline DaLoller

  • 1
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 64.0.3282.186 Chrome 64.0.3282.186
  • Playstyle: Keyboard
what to use for t in yoyoyo engine 1.51?
« 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
« Last Edit: March 23, 2018, 01:32:27 PM by DaLoller »