Strict Graphics 1024,768,16,0 Global particle_count:Int = 0 SetMaskColor 255,0,255 Global particles:TImage = LoadImage("particle.png",MASKEDIMAGE) Global particle_list:TList = CreateList() Type particle Field x:Int, y :Int Function create() p:particle = New particle p.x = MouseX() p.y = MouseY() ListAddLast particle_list,(p) Return p End Function Method draw() For p:particle = EachIn particle_list DrawImage particles,p.x,p.y,0 Next End Method End Type particle.create() Repeat Cls For p:particle = EachIn particle_list p.draw() Next Flip Until KeyHit(KEY_ESCAPE)
I dont understand why the function in the type doesnt return an error but when i try to use methods it gives one.