I like to avoid having cell divisions lying in between tiles, because it necessitates extra arrays and values. I prefer letting the tiles themselves act as the walls. Here i s an example of what I'm talking about with what you want to do implemented.
Two things to note: I used the #constant keyword to define key tile values. Normally in my own programs I make them shorter and lowercase so that they're not a pain to type. I also swapped the row and column values, because I hate using the row/column coordinates and always get mixed up with x and y values. (I always think "X is the first coordinate, Y is the second coordinate, X is horizontal, Y is vertical" xD)
//global WallImage as integer = 1
global ArrayXSize as integer = 10
global ArrayYSize as integer = 5
#constant OPEN_TILE 1
#constant WALL_TILE 2
dim DungeonArray(ArrayXSize, ArrayYSize) as integer
for x = 0 to ArrayXSize
for y = 0 to ArrayYSize
dungeonArray(x,y)=OPEN_TILE
next y
next x
for x=0 to ArrayXSize
dungeonArray(x,0)=WALL_TILE
dungeonArray(x,arrayYsize)=WALL_TILE
next x
for y=0 to arrayYSize
dungeonArray(0,y)=WALL_TILE
dungeonArray(arrayXSize/2,y)=WALL_TILE
dungeonArray(arrayXSize,y)=WALL_TILE
next y
drawTiles()
wait key
end
function drawTiles()
mult=20
for x=0 to arrayXSize
for y=0 to arrayYsize
select dungeonArray(x,y)
case OPEN_TILE
box x*mult,y*mult,(x+1)*mult,(y+1)*mult,rgb(255,255,0),rgb(255,255,0),rgb(255,255,0),rgb(255,255,0)
endcase
case WALL_TILE
box x*mult,y*mult,(x+1)*mult,(y+1)*mult,rgb(255,0,0),rgb(255,0,0),rgb(255,0,0),rgb(255,0,0)
endcase
endselect
next y
next x
endfunction