Jump to content

non accessible variable


Xaariel
 Share

Recommended Posts

Hi!
I am stuck already 2 hours with this problem. I feel like I tried every way I could think of. I searched the forum, still cant solve it.
I assume its problem with pixelsearch in Do,Until and mouseclick out of it.
 

Do
$Res = FFNearestPixel(850, 450, -1)
   If @error Then
$kk = $kk + 1
sleep(25)
ElseIf not @error Then
   $kk = 0
EndIf
Until $kk = 35
Mouseclick("right", $Res[0], $Res[1],1,2)

Mouseclick("right", $Res[0], $Res[1],1,2)
Mouseclick("right", $Res^ ERROR

error: Subscript used on non-accessible variable.

Will be really grateful if anyone can help me fix this

Link to comment
Share on other sites

@Xaariel You post an incomplete snippet of code and expect us to solve whatever issues you are encountering. Does that make sense to you?

What would you expect it to contain? Why are you storing the result of FFNearestPixel to $Res and then replacing that with $x12 / $y12? Where are these variables defined? When do they get assigned a value? When does that value change?

I would suggest that you post a complete example that we can run if you want us to provide further input. Also, tell us what application you are trying to automate because there is often a better option than performing a pixel search.

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