having trouble with a function i wrote, im fairly new to programming...
First call of this function works fine however if i call it again i get this error....
C:\Program Files\AutoIt3\Include\PKtools.au3 (80) : ==> Subscript used with non-Array variable.:
MouseClick ( "left" ,$coord[0] ,$coord[1])
MouseClick ( "left" ,$coord^ ERROR
Func Check() ;Checks For Color does action according to result
Local $coord[3]
Local $var2 = "0x57C522" ;Color to check
$coord = PixelSearch (404,507,406,509, $var2,20) ; Check for color
If @error <> 1 Then
Sleep(10)
Else
$coord = PixelSearch(450,226,570,346, "0x6CC462" ,10) ;find item
MouseClick ( "left" ,$coord[0] ,$coord[1]) ;click item
sleep(3000)
MenuSelect("Flo")
sleep(3000)
MenuSelect("He")
EndIf
EndFunc