FrameWork... How TO ?

BlitzMax Forums/BlitzMax Beginners Area/FrameWork... How TO ?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This compiles, but dies at the drawimage command.
Strict

framework brl.glmax2d
Import BRL.random
Import BRL.max2d
Import BRL.blitz

Graphics 640, 480, 0' 32
Const MaxStar: Int = 30

Type tStar
Field X, Y : Int
Field Speed, Angle : Float
EndType

Global Stars: tStar[MaxStar]
Global StarSprite: tImage


StarSprite = LoadImage("star.png", MASKEDIMAGE)

MidHandleImage StarSprite
SeedRnd MilliSecs()

For Local j:Int = 0 To MaxStar-1
Stars[j] = New tStar
Stars[j].X = Rand(0, 639)
Stars[j].Y = Rand(0, 479)
Stars[j].Angle = Rand(0, 360)
Stars[j].Speed = Rand(1, 3.5)
Next



While Not KeyHit(KEY_ESCAPE)
Cls
For Local J:Int = 0 To MaxStar-1
Stars[j].Angle :+ Stars[j].Speed
Stars[j].y :+ Stars[j].Speed

SetRotation Stars[j].Angle

DrawImage StarSprite, Stars[j].X, Stars[j].Y

If Stars[j].Y > 544 Then
stars[j].Y = -64
Stars[j].X = Rand(0, 639)
EndIf
If Stars[j].Angle > 360 Then Stars[j].Angle = 0
Next
Flip
Wend