Create Timer Question

BlitzMax Forums/BlitzMax Beginners Area/Create Timer Question

QuickSilva(Posted 2009) [#1]
If I do the following,

SuperStrict
Local Timer=CreateTimer:TTimer(60)

I get a missing type specifier message but if I run the same code in non SuperStrict mode it compiles fine. Am I missing something? Isn`t TTimer the type specifier that BMax is asking for?

Jason.


Brucey(Posted 2009) [#2]
How's about?
Local Timer:TTimer = CreateTimer(60)



QuickSilva(Posted 2009) [#3]
So obvious! Thanks Brucey.

I think that I made this silly mistake because I was reading the docs which say,

Function CreateTimer:TTimer( hertz#,event:TEvent=Null )

Jason.


Bremer(Posted 2009) [#4]
If a function needs to return something when called, its placed after a ":". Eg if you had a function where you needed to return a float you would write something like: Function calculateThis:Float(value1:float,value2:float)