Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Array variable has incorrect number ........

$
0
0

I dont understand what making error:


 

E:\Setup\Autoit\test.au3 (30) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

 

 

Plz fix for me :)

 

List.txt

 

script:

AutoIt         
#include <Array.au3>  Func readfile($fname)    Local $file = FileOpen($fname, 0)    If $file = -1 Then        MsgBox(0, "Error", "Unable to open " & $fname)        Exit    EndIf    Local $data = ""    While 1        Local $chars = FileRead($file, 1)        If @error = -1 Then ExitLoop        $data &= $chars    WEnd    Return $data EndFunc Func getDomain($url)     Local $urlArr = StringSplit($url,"/",2)     If UBound($urlArr) >=2 Then     Local $domain = $urlArr[2]     return $domain     EndIf EndFunc Func filterDomain($arr)     Local $total = UBound($arr)     For $i = $total - 1 To 0 Step -1         $domain = getDomain($arr[$i]) ; Error here ..............         For $j = $i - 1 To 0 Step -1             if $domain == getDomain($arr[$j]) Then                 _ArrayDelete($arr,$j)                 _ArraySort($arr)                 $total -= 1                 $j -= 1             EndIf         Next     Next     Return $arr EndFunc $tempListArr = StringSplit(readfile("List.txt"),@CR) _ArrayDelete($tempListArr,0) ;_ArrayDisplay($tempListArr) $arrSite = filterDomain($tempListArr) _ArrayDisplay($arrSite)

Viewing all articles
Browse latest Browse all 12506

Trending Articles