New() method

BlitzMax Forums/BlitzMax Beginners Area/New() method

You can't, not in BlitzMax.

Add a Create function to your Type. e.h.

Type TSomething
     Field x:Int
     Field y:Int

     Function Create:TSomething(x:Int,y:Int)
         Local obj:TSomething = New TSomething
         obj.x = x
         obj.y = y
         Return obj
     EndFunction
EndType

Local myVar:TSomething = TSomething.Create(100,100)