Using Type Methods problem.

BlitzMax Forums/BlitzMax Beginners Area/Using Type Methods problem.

I'm sure this is a newbie error but searching the forums hasn't helped me.

The following code generates this error
Compile Error: Identifier 'TestMethod' not found

Type TestType
Field aTestField

Method TestMethod()
aTestField = 1
EndMethod
EndType

Local testing = New TestType

testing.TestMethod()

[EDIT] Gave wrong advice

no he just needs to change the varible dec

Local testing:TestType = New TestType


then it should work fine.

Local testing:TestType = New TestType
and it should work.

lol serves me right for trying to do this while not in front of my compiler..

Thanks thats the ticket. I knew it was a newbie error but after looking at it for 45 minutes I needed help.

Diablo, it's <code> for short pieces of text, <codebox> for long pieces of text ;]