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
- Home Board index AutoHotkey Ask For Help
- Search
-
- It is currently 24 Feb 2021, 23:59
- All times are UTC-05:00
error else with no matching if,
Get help with using AutoHotkey and its commands and hotkeys
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey
- Ask For Help
- Gaming
- AutoHotkey v2 Help
- Scripts and Functions
- Gaming
- AutoHotkey v2 Scripts and Functions
- Tutorials
- Tips and Tricks
- Wish List
- Suggestions on documentation improvements
- Bug Reports
- AutoHotkey v2 Development
- AutoHotkey_H
- Ask For Help
- Development
- Announcements
- Editors
- AHK Studio
- Pulovers Macro Creator
- SciTE4AutoHotkey
- AutoGUI
- General Discussion
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- Offtopic
- RPA
- Other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)
Who is online
Users browsing this forum: AHKStudent, Bing [Bot], freakkk, mikeyww and 49 guests