Jump to content

Continueloop Problem


Recommended Posts

Yes,. i know ,.. "not you again "^^ it could be psaltyDS who gives me the last helping answer XD

Now lets se:

I tested,.. continueloop

with <>"" to find out, if something is string

Just to find out,. where the error is,.. i worte a sample,..and it causes the same error:

CODE
dim $a[10][10]

$a[0][0]="1"

$a[0][1]="1"

$a[1][0]="1"

$a[1][1]="1"

$a[2][0]="1"

$a[2][1]="1"

For $countarray2=0 to 10

Select

Case $a[$countarray2][0]< >""

ContinueLoop

$a[$countarray2][2]=WinGetHandle($a[$countarray2][0],$a[$countarray2][1])

endselect

Next

Anyone can help me??

Link to comment
Share on other sites

You had a space between <> and I changed the line to be a ubound.

Dim $a[10][10]
$a[0][0] = "1"
$a[0][1] = "1"
$a[1][0] = "1"
$a[1][1] = "1"
$a[2][0] = "1"
$a[2][1] = "1"
For $countarray2 = 0 To UBound($a) -1
    Select
        Case $a[$countarray2][0] <> ""
            ContinueLoop
            $a[$countarray2][2] = WinGetHandle($a[$countarray2][0], $a[$countarray2][1])
    EndSelect
Next
Edited by BrettF
Link to comment
Share on other sites

Just saw your last post.

You define the array as having 10 elements.

The elements start from 0. So therefore it has to end at 9.

Lets look at it so we can actually see how it is.

[0] = 1 Element

[1] = 2 Element

[2] = 3 Element

[3] = 4 Element

[4] = 5 Element

[5] = 6 Element

[6] = 7 Element

[7] = 8 Element

[8] = 9 Element

[9] = 10 Element

Arrays are a hard concept to grasp. I hope this makes some more sense. :)

Cheers,

Brett

Edited by BrettF
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...