Using Type Methods problem.

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

Lordfire(Posted 2005) [#1]
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()


Matt McFarland(Posted 2005) [#2]
[EDIT] Gave wrong advice


Diablo(Posted 2005) [#3]
no he just needs to change the varible dec



then it should work fine.


tonyg(Posted 2005) [#4]
Local testing:TestType = New TestType
and it should work.


Matt McFarland(Posted 2005) [#5]
lol serves me right for trying to do this while not in front of my compiler..


Lordfire(Posted 2005) [#6]
Thanks thats the ticket. I knew it was a newbie error but after looking at it for 45 minutes I needed help.


Hotcakes(Posted 2005) [#7]
Diablo, it's <code> for short pieces of text, <codebox> for long pieces of text ;]