Hooooooooooooold the bus
I debugged it Yahoo!!!!!
Observation, DBPro appears not to like the use of "_" in names. I noticed that all three programs used "_" in the name of the arrays so I tried changing line 24 from
"global dim TileMap(GRID_WIDTH-1, GRID_HEIGHT-1) as integer"to
"global dim TileMap(40,40)"
And it got past there before it crashed.
It then did know what "TILE_WIDTH" was so I went through and changed all values where "_" was used in the name to the actual value eg,64,and it got past that error.
Finally it crashed on the get image commands and I noticed by comparing to the book there was an extra ",1" at the end of the get image commands so I deleted those and hey presto, it works
Not bad considering its 1am here and I have ben in the sherry, hic!
OK, so now to see what a sprite does on that background.