salter Posted December 13, 2006 Share Posted December 13, 2006 hi there ya most of the time i get a error when i run my script heres the code: Func BarMaid() While 1 ToolTip("MythBot: Looking for the Bar Maid ", 2, 0) $Maid = PixelSearch(161,255,625,398,0xF8FC00,2) MouseClick("left", $Maid[0]+37,$Maid[1]-52,2) Sleep(500) If PixelGetColor(91,231) = 0x8038A0 Then MouseClick("left", 240,272,2) Sleep(500) MouseClick("left", 240,272,2) ExitLoop EndIf WEnd EndFunc And the error i get is: MouseClick("left", $Maid[0]+37,$Maid[1]-52,2) MouseClick("left", $Maid^ERROR Error: Subscript used with non-Array variable. anyone know how to fix this ive been trying for a while, any help would be greatly apreciated Link to comment Share on other sites More sharing options...
Valuater Posted December 13, 2006 Share Posted December 13, 2006 (edited) If Not @error then MouseClick() if the color was not found you will get an error 8) Edited December 13, 2006 by Valuater Link to comment Share on other sites More sharing options...
Valuater Posted December 13, 2006 Share Posted December 13, 2006 your code PixelSearch(161,255,625,398,0xF8FC00,2) per help you are searching ------161-------------------------------------------------------------------------------- 625 255 | | | | | | | 398 2 color variations and all pixels ************************************************* may i suggest 1 check your pixel search area 2 use 10 @ minimum for shade variation 3 skip some pixels to make the search quicker example ( with your area of searching ) PixelSearch( 161, 255, 625, 398, 0xF8FC00, 10, 5) ... just some thoughts 8) BTW are you using.. OPTIONS Opt("MouseCoordMode", ?) ;1=absolute, 0=relative, 2=client and Opt("PixelCoordMode", ?) ;1=absolute, 0=relative, 2=client Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now