do others have problems compiling this code?

BlitzMax Forums/BlitzMax Beginners Area/do others have problems compiling this code?

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.

I have written this vertical bitmap scroller based on one I did for the regular blitz and it compiles just fine for me, but someone posted on my website forum, that it gives the following error:

"Expecting expression but encountered Type"
and something like "v_scroll.bmx;3;42"

Could some of you please try this out and let me know if you are having problems compiling the code as well.

Graphics 640,480,0

font = LoadAnimImage( "font2.png", 18, 18, 0, 96 )

Global upScrollList:TList = CreateList()
Type upScrollText
Field txt$
Field yposition
Method New()
ListAddLast upScrollList,Self
End Method
End Type

upScrollTextFontHeight = 18
upScrollTextFontWidth = 18
upScrollCentered = True
upScrollUpdateFreq = 25
upScrollStep = 2
upScrollReset = 480 + upScrollTextFontHeight
RestoreData upScrollMessage
While txt$ <> "*"
ReadData txt$
If txt$ <> "*" Then
ct:upScrollText = New upScrollText
ct.txt$ = txt$
ct.yposition = upScrollReset
upScrollReset = upScrollReset + upScrollTextFontHeight
End If
Wend

While Not KeyHit(KEY_ESCAPE)

Cls
For ct = EachIn upScrollList
	If upScrollCentered Then
		offset = 320 - ( Len( ct.txt$ ) * upScrollTextFontWidth ) / 2
	Else
		offset = 0
	End If
	For i = 0 To Len( ct.txt$ )-1
		char = Asc( Mid( ct.txt$, i+1, 1 ) ) - 32
		DrawImage font, offset + i * 18, ct.yposition, char
	Next
Next

If MilliSecs() > lastUpScrollUpdate + upScrollUpdateFreq Then
lastUpScrollUpdate = MilliSecs()
For ct = EachIn upScrollList
ct.yposition = ct.yposition - upScrollStep
If ct.yposition < -upScrollTextFontHeight Then ct.yposition = ct.yposition + upScrollReset
Next
End If

Flip

Wend
End

#upScrollMessage
DefData ""
DefData ""
DefData "STAR WARS"
DefData ""
DefData "EPISODE IV: A NEW HOPE"
DefData ""
DefData ""
DefData ""
DefData "It is a period of civil war."
DefData "Rebel spaceships, striking"
DefData "from a hidden base have won"
DefData "their first victory against"
DefData "the evil Galactic Empire."
DefData ""
DefData ""
DefData "During the battle, Rebel spies"
DefData "managed to steal secret plans"
DefData "to the Empire's ultimate weapon,"
DefData "the Death Star, an armoured"
DefData "space station with enough power"
DefData "to destroy an entire planet."
DefData ""
DefData ""
DefData "Pursued by the Empire's sinister"
DefData "agents, Princess Leia races home"
DefData "aboard her starship, custodian"
DefData "of the stolen plans that can"
DefData "save her people and restore"
DefData "freedom to the galaxy..."
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData ""
DefData "*"


You will need this image:



Thanks,