Nebieboy Posted December 13, 2006 Posted December 13, 2006 hey im trying to get some health code to work i found on this forum, the line giving me the problems is $Coord = PixelSearch(311, 700, 512, 713, 0xD8121E) $Status_Health_Dead = $Coord[0]& ", " & $Coord[1] $Status_Health_Low = $Coord[0] + 47 & ", " & $Coord[1] $Status_Health_Medium = $Coord[0] + 94 & ", " & $Coord[1] $Status_Health_High = $Coord[0] + 141 & ", " & $Coord[1] $Status_Health_Full = $Coord[0] + 188 & ", " & $Coord[1] If Hex( PixelGetColor($Status_Health_Full), 6 ) = "D8121E" Then ;Full health - Run code here Else i get "ERROR: PixelGetColor() [built-in] called with wrong number of args. If Hex( PixelGetColor($Status_Health_Full)" anyone know why?
Helge Posted December 13, 2006 Posted December 13, 2006 What do you think would happen in the following code ?$string = "Because, believe it or not, you actually only give PixelSearch one single parameter." MsgBox(64, "", $string) Would $string just be a normal string and be displayed as a normal sentence, or would AutoIt error out because you gave MsgBox 5 paramaters instead of 3 or 4 ? Run the script and then re-think your logic...
Nebieboy Posted December 13, 2006 Author Posted December 13, 2006 lol cheers, guess the code that was posted by him didnt work but simple enuff to change, thanks.
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