Sign in to follow this  
Followers 0
faustf

arry error

4 posts in this topic

#1 ·  Posted

hi guys

i have a bidimensional  array :

Row|Col 0|Col 1|Col 2|Col 3|Col 4
[0]|Taglia|Taglia|Taglia coppa|Taglia coppa|
[1]|32|34|A|AA|
[2]|sku1|sku2|||
[3]|2.00|1.00|||
[4]|12.00|12.00|||
[5]|fkskfòfksòfks.jpg|fksfsfhskhkdsf.jpg|||

why i have  this error??

E:\_GESTIONALE_NEW\GEST_NEW.au3" (1600) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
If $aBLSplitarray[0][$z] = $aBLSplitarray[0][$z + 1] Then
If $aBLSplitarray[0][$z] = ^ ERROR

 

_ArrayDisplay($aBLSplitarray)


    For $i = 0 To UBound($aBLSplitarray, 2) - 1


        If $aBLSplitarray[0][$i] = $aBLSplitarray[0][$i + 1] Then

            _True_write_File($sLPath2step, "'<Nome>" & $aBLSplitarray[0][$i] & "</ Name>' & _") ; taglia

            _True_write_File($sLPath2step, "'<Valore>" & $aBLSplitarray[1][$i] & "</ Valore>' & _") ; 42
            _True_write_File($sLPath2step, "'<Valore>" & $aBLSplitarray[1][$i + 1] & "</ Valore>' & _") ; 42
        EndIf

    Next

thankz at all :)

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

faustf,

2 hours ago, faustf said:

If $aBLSplitarray[0][$i] = $aBLSplitarray[0][$i + 1] Then

What happens at the end of the array?

Try like this

For $i = 0 To UBound($aBLSplitarray, 2) - 2

kylomas

1 person likes this

Forum Rules         Procedure for posting code

Share this post


Link to post
Share on other sites

#3 ·  Posted

thankzz work correctly 

but  not understund  why  change  -1  to - 2

:)

 

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

4 minutes ago, faustf said:

but  not understund  why  change  -1  to - 2

because: If $aBLSplitarray[0][$i] = $aBLSplitarray[0][$i + 1] Then

 

 

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