problem with type usage

BlitzMax Forums/BlitzMax Programming/problem with type usage

I'm trying to get back into using types, what's wrong with the following?

Graphics 640,480

Type Tsprite
Field sprite:timage=LoadImage("sprite.jpg",1)
Field x:Int
Field y:Int
End Type

Global player:Tsprite=New Tsprite

player.x=50
player.y=50
DrawImage player.sprite:timage,player.x,player.y
Flip
While Not KeyHit(key_q)

Wend