My scripts usually need to jump around a lot and i get the "goto/gosub cannot go to a block that doesnt enclose it" error a lot because of it.
I basically need a simple way of jumping to different blocks which i can have anywhere in the script~
an example being:
attack: pixelsearch... ;to find a monster mouseclick, left %x% %y% ;attacks goto, checkhp return checkhp: pixelsearch... ;checks hp bar level if errorlevel ;fails to find hp at proper level goto potionsearch else sleep, 500 goto, combatcheck return potionsearch: pixelsearch... ;checks inventory for potion if errorlevel click... ;teleports away, out of potions else click %x% %y% ;uses available potion in inventory goto, checkhp return combatcheck: pixelsearch... ;checks if monster is dead yet if errorlevel ;if dead finds new monster goto, attack else sleep, 500 goto, checkhp return
im pretty new so my scripts arent very organized so if anyone has advice for making them cleaner/more efficient id appreciate the help