formatmylife12 Posted November 10, 2007 Posted November 10, 2007 I had somethings like this: Dim $aRecords If Not _FileReadToArray($f, $aRecords) Then MsgBox(4096, "Error", " Not found the File to Check: "&$f) Exit EndIf ;============================================================================================== $f1="live_"&$f $f40="die_"&$f $file1 = FileOpen($f1, 1) $file40 = FileOpen($f40, 1) ;============================================================================================== For $x = 1 To $aRecords[0] If StringLen($aRecords[$x])>24 Then ;============================================================================================== $array = StringSplit(StringReplace($aRecords[$x], $d, @LF), @LF) $str1 = StringReplace($array[$vstr1], " ", "") $str2 = StringLeft(StringReplace($array[$vstr2], " ", ""), 2) $str3 = StringRight(StringReplace($array[$vstr3], " ", ""), 2) $str4= StringReplace($array[$vstr4], " ", "") ---------------- When I run , it met the errors, I think $array is not a string or empty, I dont know why, Please help!
herewasplato Posted November 11, 2007 Posted November 11, 2007 Welcome to the forum. ...When I run , it met the errors, I think $array is not a string or empty, I dont know why, Please help!Test your assumption with _ArrayDisplay($array) or ConsoleWrite or MsgBox #include <Array.au3> ... ... ... $array = StringSplit(StringReplace($aRecords[$x], $d, @LF), @LF) _ArrayDisplay($array) ... ... ... [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now