Jump to content
Sign in to follow this  
dgx03start

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

Recommended Posts

dgx03start

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

Share this post


Link to post
Share on other sites
big_daddy

Please review the forum rules, specifically the section regarding game automation.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×