Sign in to follow this  
Followers 0
Valuater

array error

2 posts in this topic

#1 ·  Posted (edited)

EDIT

Got it...

thanks for checking

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites



been at this all morning....

just need a little help

For $b = 1 to 1000
            If @error Then ExitLoop
            
            $bRead = FileReadLine($file2, $b)
            $bSplit = StringSplit($bRead, ",")
            
            $TbRecords [0][0] = $bSplit[0]
            $TbRecords [$b][1] = $bSplit[1]
            $TbRecords [$b][2] = $bSplit[2]
            $TbRecords [$b][3] = $bSplit[3]
            $TbRecords [$b][4] = $bSplit[4]
            $TbRecords [$b][5] = $bSplit[5]
            
            
            _ArraySwap($TbRecords[$b][1], $TbRecords[$b][2])
            _ArraySort( $TbRecords,0,1,0,2)
            
            FileWriteLine($file3, $TbRecords [$b][1] & "," & $TbRecords [$b][2] & "," & $TbRecords [$b][3] & "," & $TbRecords [$b][4] & "," & $TbRecords [$b][5])
            
            
            
        Next

the file open and every thing is ok... there are 5 dimensions to the split

but i get this error

i cant find where the error is

8)

the first thing i'd suggest is to reformat your loop to a while instead of a For loop, because you're limiting the number of lines. I know that isn't what you were asking for, but just a tip. could you include some sample data that is being brought in? also is this error happening as soon as the script is run, or after some iterations? it's possible you have a blank line in the file, or a header line etc that isn't formatted the same, so you wouldnt' get the same number of elements from that line.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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  
Followers 0