Type Syntax error

BlitzMax Forums/BlitzMax Programming/Type Syntax error

Jonah(Posted 2011) [#1]
My program reads:

Graphics 1000,500
Const Player1:String = "00000"
Const StartX = 500, StartY = 400

Type TPlayer1
Field x,y
Field life
Field Player1string:String
EndType

Global player:TPlayer1 = New TPlayer1
Player.x = StartX
Player.y = StartY

(with some stuff inbetween, but that's all that is important.)
whenever I run it, I get the error " Syntax error in user defined type declaration" and the line
player.x = startX
is highlited...
please help


Gabriel(Posted 2011) [#2]
The code above compiles just fine. Evidently some of the code which "isn't important" is more important than you thought, because that's where the error is.


Jonah(Posted 2011) [#3]
Thanks
I found the problem


col(Posted 2011) [#4]
Just as a little tip....

Using 'Strict' or 'SuperStrict' as the very first line in your programs can highlight these kind of errors during compilation instead of causing little hidden bugs and errors like you had.