Jump to content
Sign in to follow this  
BluhBlah

Code need some help

Recommended Posts

BluhBlah

Gives error:

Line 9

WEnd

Error: "Wend" statement with no matching "While" statement.

It gave error when i added

If $coord = PixelSearch(512, 392, 512, 392, 0x9B9992) Then

But really need this so.. Help please

Dim $stop = 0

HotKeySet("{F4}", "toggel")
HotKeySet("{F5}", "off")

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then
             $coord = PixelSearch(146, 85, 146, 85, 0xD6593B)
            If Not @error Then
                Send ("B")
                Sleep (5000) Then
                $coord = PixelSearch(512, 392, 512, 392, 0x9B9992)
                If Not @error Then
                Send ("1y7")
                Send ("{ENTER}")
            EndIf
        EndIf
    EndIf
WEnd
                
                
Func toggel()
    If $stop = 0 Then
        $stop = 1
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0 
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit
EndFunc
Edited by Xoriaz

Share this post


Link to post
Share on other sites
Avro

You missed the ENDIF for the last statement you added.

Dim $stop = 0

HotKeySet("{F4}", "toggel")
HotKeySet("{F5}", "off")

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then
             $coord = PixelSearch(146, 85, 146, 85, 0xD6593B)
            If Not @error Then
                Send ("B")
                Sleep (5000)
                If $coord = PixelSearch(512, 392, 512, 392, 0x9B9992) Then
                Send ("123")
                Send ("{ENTER}")
                EndIf ;missed this one
            EndIf
        EndIf
    EndIf
WEnd


Func toggel()
    If $stop = 0 Then
        $stop = 1
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
Yashied

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.