error else with no matching if,

Get help with using AutoHotkey and its commands and hotkeys
ravena1
Posts: 14
Joined: 06 Sep 2017, 15:13

error else with no matching if,

11 Sep 2017, 15:47

my autohotkey script seems to be wrong , i keep getting error else with no matching if, is there something that i missed?


loop {
loot()1
}



loot1()
{
ImageSearch,violetX, violetY, 266, 141, 579, 527, C:\image\loot.png
If ErrorLevel {
mobs1()
}
else If ErrorLevel=0 {

mousemove(%violetX%,%violetY%)
mouseclick, left
return
}
else
{
sleep, 100
return
}
}


mobs1()
{
PixelSearch, X, Y, 22, 216, 776, 607, 0x00FF00, 0, fast
If ErrorLevel {
mobs2()
}
else If ErrorLevel=0 {

mousemove(%X%, %Y%)
MouseClick, left
return
}
else
{
sleep, 100
return
}
}

;---- so on so fort... same script above

Return to “Ask For Help”

Who is online

Users browsing this forum: Hash817, mikeyww, WeedTrek and 37 guests