Use binary file access, makes things easier and faster.
VB Code:
'Write Open Filename For Binary As Filenumber For i = 0 To UBound(mbytMap, 1) For j = 0 To UBound(mbytMap, 2) Put Filenumber ,, mbytMap(i, j) Next Next Close Filenumber 'Read Open Filename For Binary As Filenumber For i = 0 To UBound(mbytMap, 1) For j = 0 To UBound(mbytMap, 2) Get Filenumber ,, mbytMap(i, j) Next Next Close Filenumber
I also recommend you to save the map dimensions just before the map data (so you have no fixed size). Note that you'll have to ReDim the map array before reading the data!





Reply With Quote