Jump to content

IsArray error?


Recommended Posts

K so heres my code

func Loop()
    $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray $Attacker=1 Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10)
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
    Else 
        MouseClick("left", 786, 174, 1)
        MouseClick("left", 813, 202, 1)
         EndIf
    Loop()
EndFunc

and heres the error

If IsArray $Attacker=1 Then
If ^ ERROR
>Exit code: 1   Time: 38.098

I don't understand it at all so please explain muttley

Edited by TerryisBroke
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...