Jump to content
Sign in to follow this  
meowbits

ERROR: unbalanced paranthesis expression.

Recommended Posts

meowbits

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?

Share this post


Link to post
Share on other sites
WideBoyDixon

; 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])

Share this post


Link to post
Share on other sites
Dougiefresh

$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

Share this post


Link to post
Share on other sites
meowbits

; 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!!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.