Jump to content

Error:Subscript used with non-Array variable [Bot]


dgx03start
 Share

Recommended Posts

Hello, someone can solve this for me please ?!

Everytime my game finish, my script crashes:

"Line 5 (File "C:Documents and SettingsAdministratorDesktopbolScriptsRefBotUnstuck.au3");

 
$halfheight = $Window[3] / 2
$halfheight = $Window^ERROR
 
Error:Subscript used with non-Array variable."
 
Here is the script:

 

while 1
    if FileExists(@scriptdir & "GameEnded.txt") then
        WinActivate("League of Legends")
        $Window = WinGetPos("League of Legends")
        $halfheight = $Window[3] / 2
        $xcoord = $Window[0] + $Window[2]/2
        $ycoord = $Window[1] + $Window[3]
        Do
        MouseClick("left",$xcoord,$ycoord,1,0)
        $ycoord = $ycoord - 10
        Until $ycoord < $halfheight
        Sleep(20000)
    EndIf
    ;if WinExists("League of Legends") And WinActive("League of Legends") Then WinActivate("Program Manager")
    Sleep(3000)
WEnd

 

Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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