Redim array

BlitzMax Forums/BlitzMax Beginners Area/Redim array

Thanks. But now i'm getting an error which says incorrect number of array dimensions...but thats not right as i'm using 3 throughout.

Function populate_tiles(map:String)
	Local count:Int
	Local xCount:Int = 0
	Local yCount:Int = 0
	Local mapFile
	Local dataFile
	Local mapCode
	
	dataFile = ReadFile("data/maps.txt")
		xSize = Readint(dataFile)
		Print xSize
		ySize = Readint(dataFile)
		Print ySize
	CloseFile(dataFile)	
	mapFile = ReadFile(map)
	
	tiles=[xSize,ySize,3]
	
	For yCount = 1 To ySize
		For xCount = 1 To xSize
			mapCode = ReadByte(mapFile)
			
				tiles[xCount,yCount,2] = mapCode
			
		Next
	Next
	CloseFile(mapFile)
	
	FlushMem
End Function