res2cpu Posted November 9, 2007 Posted November 9, 2007 (edited) Hey, I have looked over the forums and help files for the last 2 hours and am going to go crazy! I am trying to remove data from an array which has more then one dimension. CODEFunc _process_data () $datafile = IniRead ( $inifile, "file", "datafile", "") $tempfile = IniRead ( $inifile, "file", "tempfile", "") ;MsgBox(4096, "returned data from dialog (if any)", $datafile) ;MsgBox(4096, "returned data from dialog (if any)", $tempfile) $evedata = _CSVReadFile( $tempfile, "," ) _ArrayDisplay ( $evedata ) For $i = Ubound($evedata)-1 to 1 step -1 ;MsgBox(4096, "", $i ) $type = StringInStr ( $evedata[$i][2], "donation",0, 1 ) ;MsgBox(4096, "", $i & " - " & $type ) if $type > 0 Then _ArrayDelete ( $evedata, $i ) MsgBox(4096, "", $i & " - " & $type & " removed" ) EndIf Next _ArrayDisplay ( $evedata ) EndFunc I end up with the error "Array variable has incorrect number of subscripts or subscript dimension range exceeded." Here is a sample of the data im working with in csv format CODE2007-10-30 22:10:00,542613580,Player Dnation,user1,user2,,-567000000.00,1056201337.00,lotto win 2007-10-30 22:09:00,542608771,Player Donation,user1,user2,,-567000000.00,1623201337.00,lotto win Can anyone help or give me any pointers please? Res2cpu Edited November 9, 2007 by res2cpu
randallc Posted November 9, 2007 Posted November 9, 2007 Hi, Try "_ArrayDelete2D" in "Array2d.au3" UDF in my sig? best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
res2cpu Posted November 9, 2007 Author Posted November 9, 2007 cool, thanks randallc the only other way i could think todo it was to remake the array and copy the stuff to it.
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