Break is not working Topic is solved

Ask gaming related questions (AHK v1.1 and older)
noobAHK

Break is not working  Topic is solved

23 Jan 2018, 16:23

What is wrong with this code? The break is not breaking the second loop, and the color is right(tested on shorter program). The program should go to GOSUB Run after the the break happens.

Code: Select all

treebotfromyew:
	loop {
		loop {
		
			Gosub AntiCheat
			;what do you want to click?
			MouseMove,1552, 897
			sleep, 200
			click
			gosub Navi
			
			;How fast?
			sleep, 1200
			
			Gosub AntiCheat
			PixelGetColor, color, 1505, 971
			if color = 0x95BACB
			{
			break
			}
		}
		gosub Run
		gosub tobank
		gosub Run
		gosub toyew
	}
return
icuurd12b42
Posts: 202
Joined: 14 Aug 2016, 04:08

Re: Break is not working

24 Jan 2018, 05:14

https://autohotkey.com/docs/commands/Break.htm

Code: Select all

...
			if color = 0x95BACB
			{
			break outer
			}
		}
break_outer:
		gosub Run
...

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 73 guests