Zemallo Posted October 19, 2009 Posted October 19, 2009 I need help with this bot i have im getting an error on line 39 of it i get an error saying i dont have a matching If statement with my Else statement the error says Error: "Else" Statement with no matching "If" statement. please help ps The bot is for Holy Beast Online expandcollapse popup;Made by Snow9 ;thx to elitepvpers.com for learning me the basics of auto it ; ;move the enemys lifebar to the upper right corner ;of the screen and make sure its on top of your map ;your life bar should be in the upper left corner Global $Paused HotKeySet("{end}", "Pause") HotKeySet("{home}", "Start") While 1 Sleep(100) WEnd Func Pause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFunc ; keys (f1 f2 etc dont work for HBO) ; & 1 ; é 2 ; " 3 ; ' 4 ; ( 5 ; § 6 ; è 7 ; ! 8 ; ç 9 ; à 0 Func Start() while 1 Sleep(100) Send("{tab}") ;i send tab here, and it does work, mob is selected Else while $mob = NOT "72812c" ;last pixel of mobs lifebar, if this is not red(72812c is the hex code) then the mob is dead, but pixelsearch doesnt work in hbo Send("{ç}") $mm = PixelGetColor ( 1138,12 ) $mob = Hex($mm, 6) wend Send("{à}") Sleep(500) Send("{à}") Sleep(300) Send("{à}") EndIf endif Wend endfunc
omikron48 Posted October 19, 2009 Posted October 19, 2009 (edited) Your IF statements lack the IF part: This is the proper IF statement structure: If (condition) Then ;code goes here EndIf If (condition) Then ;code goes here Else ;code goes here EndIf Obviously, (condition) would be replaced by the logical condition used by your IF statement. Check the help file for more information. Edited October 19, 2009 by omikron48
jvanegmond Posted October 19, 2009 Posted October 19, 2009 Double post. http://www.autoitscript.com/forum/index.php?showtopic=102677&view=findpost&p=737354 github.com/jvanegmond
Zemallo Posted October 19, 2009 Author Posted October 19, 2009 Your IF statements lack the IF part: This is the proper IF statement structure: If (condition) Then ;code goes here EndIf If (condition) Then ;code goes here Else ;code goes here EndIf Obviously, (condition) would be replaced by the logical condition used by your IF statement. Check the help file for more information. im still real fuzzy i see that if goes before else but im unsure of where to place the if x.x
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