Hi there,
I'am using DBP 7.5
Compiling the code below send back this error :
Quote: "Cannot declare 'BYTE' twice ar line 96"
26 Tile_Depth as BYTE = 0
// I Removed lines [27-92] for this post
93 If I$="B"
94 Tile_Depth = 8 : Global Dim Map(Map_W,Map_Y) as BYTE
95 Else
96 Tile_Depth = 16 : Global Dim Map(Map_W,Map_Y) as WORD
97 EndIf
And compiling these ones (slightly modifications) works perfectly...
26 Tile_Depth as BYTE = 0
// I Removed lines [27-92] for this post
93 If I$="B"
94 Tile_Depth = 8
95 Global Dim Map(Map_W,Map_Y) as BYTE
96 Else
97 Tile_Depth = 16
98 Global Dim Map(Map_W,Map_Y) as WORD
99 EndIf
The code below works too.
If I$="B"
Tile_Depth = 8
Global Dim Map(Map_W,Map_Y) as BYTE
Else
Tile_Depth = 16 : Global Dim Map(Map_W,Map_Y) as WORD
EndIf
And this latest one works fine too.
If I$="B"
Tile_Depth = 8 : Global Dim Map(Map_W,Map_Y) as BYTE
Else
Tile_Depth = 16
Global Dim Map(Map_W,Map_Y) as WORD
EndIf
I would like to understand if I made a mistake into the 1st version of the code (using ':'?) or if the error is related to a bug of the compiler.
Thanks.
Cheers,
Chris