Hello
I have the following problem. I am getting the following error "array refrence out of bounse" and I can not quite figure out the cause.
Does anyone has a suggestion on how to solve the problem.

The error occurs in the following code in the line( $Groups[$Count] = $Group - marked with red):

PS. I'm not a big KIX script guru ;-)


If (GetFileSize($ULTmpFile + ".iso8859") > 0)

$Err = Open(9,$ULTmpFile + ".iso8859")

$Readln = Readline(9)
While (@Error = 0)

If(InStr($Readln,"cn:"))
$Group = SubStr($Readln, 5,Len($Readln)-4)
; ?"$Group $Count" GET$

$Groups[$Count] = $Group
$Count = $Count + 1
EndIf
$Readln = Readline(9)
Loop

$ULCount = $Count - 1 ; Antallet af Grupper, startende ved 0
; ?"$UlCount"
$ULResult = 0
$Err = Close(9)
Else
$ULResult = 1
EndIf