Jump to content

ERROR: unbalanced paranthesis expression.


Recommended Posts

ERROR: unbalanced paranthesis expression.

; start pixel search for store icon

$coord1 = PixelSearch(0,0,770,525, $storeIconColor,0)

If IsArray($coord1) = 1 Then

; save coords as 'storeCoords'

$storeCoords = ($coord1[0], $coord1[1])

MouseClick("left", $storeCoords[0], $storeCoords[1])

Anyone know what the problem here is?

Link to comment
Share on other sites

; start pixel search for store icon
$coord1 = PixelSearch(0,0,770,525, $storeIconColor,0)
If IsArray($coord1) = 1 Then
; save coords as 'storeCoords'
$storeCoords[0] = $coord1[0]
$storeCoords[1] = $coord1[1]
MouseClick("left", $storeCoords[0], $storeCoords[1])

Link to comment
Share on other sites

$storeCoords = ($coord1[0], $coord1[1])

You need to define the dimensions of the array like below:

dim $StoreCoords[2] = [$coord1[0], $coord1[1]]

or if you're just going to copy the results from one variable to another, I think something like this would work:

$StoreCoords = $coord1
Edited by Dougiefresh
Link to comment
Share on other sites

; start pixel search for store icon
$coord1 = PixelSearch(0,0,770,525, $storeIconColor,0)
If IsArray($coord1) = 1 Then
; save coords as 'storeCoords'
$storeCoords[0] = $coord1[0]
$storeCoords[1] = $coord1[1]
MouseClick("left", $storeCoords[0], $storeCoords[1])
THANKS!!
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...