Jump to content
Sign in to follow this  

problems with arraydelete

Recommended Posts



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.

Func _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" )



_ArrayDisplay ( $evedata )


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

2007-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?


Edited by res2cpu

Share this post

Link to post
Share on other sites


thanks randallc

the only other way i could think todo it was to remake the array and copy the stuff to it.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this