Sign in to follow this  
Followers 0
UndeadHarlequin

Continueloop Problem

6 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Test your script: works,.. deleted blanc, in my script,.. doesnt work,.. i deleted al blanks,. and copied parts of your code,.. worked,..

but i cant find out why it works,.. or why it didnt work,...

Anyone has n answer?

until than ,..

For $i=0 to 180

Delet every chart

next

,..

Share this post


Link to post
Share on other sites

Mistakeline:

For $countarray2=0 to 10

Working vers

For $countarray2 = 0 To UBound($a) -1

Error charts= 10 ,.. correct,. Ubound($a)-1

WHY??

Why cant this code count until 10??

HELPOo

HEEELP:-)

thx

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

AH ^^ fuck ,.. to easy XD

,..much to easy XD

yes logo,.. erm 2:37 ,.. perhaps a bit late 4 goning on with programs

Goodnight and thx ^^

Edit:AAARG *smashing head against brickwall* stupid,.. WHY,.,.. thx again

Edited by UndeadHarlequin

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