Jump to content
Sign in to follow this  
Arterie

Color Error

Recommended Posts

Arterie

I have a problem with my little helping hand for css. If i start it it says there is an expression error in the line with the command ";error" in the getpixel function on the buttom.

But please view it as a script ans not as a cheat. Please.

#include <Color.au3>


$team = 1
HotKeySet("{HOME}","toogle")

While 1 
    If GetPixel() = 1 And $team = 1 Then
        MouseClick("left")
    ElseIf
        GetPixel() = 2 And $team = 2 Then
        MouseClick("left")
    EndIf
    
WEnd


Func toogle()
    If $team = 1 Then
        $team = 2
        SplashTextOn("", "Shooting on Counter-Terrorists", 150, 15, 0, 0, 1, "Arial", "8")
        Sleep(1000)
        SplashOff()
    Else
        $team = 1
        SplashTextOn("", "Shooting on Terrorists", 150, 15, 0, 0, 1, "Arial", "8")
        Sleep(1000)
        SplashOff()
    EndIf
EndFunc
    
    


Func GetPixel()
    $color = PixelGetColor(512, 384)
$gblue = _ColorGetBlue($color)
$ggreen =_ColorGetGreen($color)
$gred = _ColorGetRed($color)


    If $gred <= 255 And $gred >= 0 And $gblue <= 10 $gblue >= 0 And $ggreen <= 10 And $ggreen >= 0 Then;error
        Return 1
    ElseIf $gblue <= 255 And $gblue >= 0 And $ggreen <= 10 And $ggreen >= 0 And $gred <= 10 And $gred >= 0 Then;error
        Return 2
    Else
        Return 0
    EndIf
EndFunc
Edited by Arterie

Share this post


Link to post
Share on other sites
Valuater

Maybe...

#include <Color.au3>


$team = 1
HotKeySet("{HOME}","toogle")

While 1    
    If GetPixel() = 1 And $team = 1 Then
        MouseClick("left")
    ElseIf GetPixel() = 2 And $team = 2 Then
        MouseClick("left")
    EndIf
    
WEnd


Func toogle()
    If $team = 1 Then
        $team = 2
        SplashTextOn("", "Shooting on Counter-Terrorists", 150, 15, 0, 0, 1, "Arial", "8")
        Sleep(1000)
        SplashOff()
    Else
        $team = 1
        SplashTextOn("", "Shooting on Terrorists", 150, 15, 0, 0, 1, "Arial", "8")
        Sleep(1000)
        SplashOff()
    EndIf
EndFunc
    
    


Func GetPixel()
    $color = PixelGetColor(512, 384)
    
    $gblue = _ColorGetBlue($color)
    $ggreen =_ColorGetGreen($color)
    $gred = _ColorGetRed($color)


    If $gred <= 255 And $gred >= 0 And $gblue <= 10 And $gblue >= 0 And $ggreen <= 10 And $ggreen >= 0 Then; error
        Return 1
    ElseIf $gblue <= 255 And $gblue >= 0 And $ggreen <= 10 And $ggreen >= 0 And $gred <= 10 And $gred >= 0 Then;error
        Return 2
    Else
        Return 0
    EndIf
EndFunc

in SciTE Editor, there is a "tooL' called Syntax check... use that to find errors

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Arterie

Thank you

Share this post


Link to post
Share on other sites

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  

×