I verified with the script that the dimension in the array that I want is 66. I tried entering that for array2, but I still can't get it to work. I get the error "error in expression" for line 65, which is:
 Code:
$array[$count1] = $Bits[1]


Here is the full code that I have:
 Code:
$csv="C:\temp\test.csv"
Open(3,$csv) = 0
$count1 = 0
$RL = ReadLine(3)
  While not @ERROR
$RL = ReadLine(3)
  $Bits = Split($RL,"|")
  If InArray($Array,$Bits[1]) = 0
  $array[$count1] = $Bits[1]
  $array2[$count1] = $Bits[66]
  $Count1 = $Count1 + 1
  EndIf
 Loop

For Each $Value In $Array2
  $sum = $sum + $value
Next


What is wrong with this? Do I need to change the bits[1] to anything?

Thanks.