TileNumbers are stored in an array (TileNumber[0. 0] = 1), And are used To Print the map.
To avoid using a lengthy Select Case statement, I am trying To convert the integer value
from the TileNumber array To a String And use String concantenation To draw the image To
the screen as follows. I am getting the error message "Unable to convert from 'String' to
'TImage'"
Images are loaded as follows
Local Tile1 = LoadImage("Incbin::grassTile.bmp")
Local Tile2 = LoadImage("Incbin::rockTile.bmp")
Local Tile3 = LoadImage("Incbin::sandTile.bmp")
The screen is printed using the following loop.
For x = 0 To 24
For y = 0 To 17
Number = Int TileNumber[x, y]
TileString = String(Number)
DrawImage "Tile"+TileString, x*32, y*32
Next
Next
To avoid using a lengthy Select Case statement, I am trying To convert the integer value
from the TileNumber array To a String And use String concantenation To draw the image To
the screen as follows. I am getting the error message "Unable to convert from 'String' to
'TImage'"
Images are loaded as follows
Local Tile1 = LoadImage("Incbin::grassTile.bmp")
Local Tile2 = LoadImage("Incbin::rockTile.bmp")
Local Tile3 = LoadImage("Incbin::sandTile.bmp")
The screen is printed using the following loop.
For x = 0 To 24
For y = 0 To 17
Number = Int TileNumber[x, y]
TileString = String(Number)
DrawImage "Tile"+TileString, x*32, y*32
Next
Next