Jump to content

Get error, when start script


 Share

Recommended Posts

Hey everybody ..

I've just wrote a script but when i will start it, everytime the same error comes.

$bord_vert = 23
$bord_hori = 4
$wind_size = WinGetClientSize("World of Warcraft")
$wind_posi = WinGetPos("World of Warcraft")
$wind_x = $wind_posi[0] + $bord_hori
$wind_y = $wind_posi[1] + $bord_vert

     WinActivate("World of Warcraft")
     WinSetOnTop("World of Warcraft", "", 0)
   
For $z = 1 to 4 Step 1
    Send("{home}")
  Next
    Send("{end}")
   
While 1
  For $i = 50 to 550 Step Random(95,105)
   For $g = 50 to 750 Step Random(45,55)
     Sleep(50)
     MouseMove($g + $wind_x,$i + $wind_y)
     MouseClick("right")
     Sleep(50)
   Next
  Next
  Sleep(Random(60000,80000))
WEnd

The error :

Line 5 (File "C:/Program Files/Autoit3/bgjoin.au3"):

$wind_x = $wind_posi[0]+ $bord_hori

$wind_x = $wind_posi^ ERROR

Error : Subscript used with non-Array variable.

thanks for every help. :whistle:
Link to comment
Share on other sites

You're missing the window text in these lines:

$wind_size = WinGetClientSize("World of Warcraft")oÝ÷ Ù«­¢+ØÀÌØíÝ¥¹}Á½Í¤ô]¥¹ÑA½Ì ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì¤oÝ÷ Ù«­¢+Ù]¥¹Ñ¥ÙÑ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½ÐìoÝ÷ Ù8^ÊÈhºW[zX¤zØb±«­¢+ØÀÌØíÝ¥¹}Í¥éô]¥¹Ñ
±¥¹ÑM¥é ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤oÝ÷ Ù«­¢+ØÀÌØíÝ¥¹}Á½Í¤ô]¥¹ÑA½Ì ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½ÐìoÝ÷ Ù«­¢+Ù]¥¹Ñ¥ÙÑ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Link to comment
Share on other sites

You're missing the window text in these lines...

Not exactly, since the text is optional in all of those functions.

You get an error because you blindly expect WinGetPos to always return an array, when it actually

doesn't if the specified window isn't found. "Returns 0 and sets @error to 1 if windows is not found."

Check that the title you specified is correct, add some error-checking and maybe also add a WinWait

in the start...

Or basically just consider playing without cheats, as ironmanexe suggests...

Edited by Helge
Link to comment
Share on other sites

Wrong too...

Maybe I was wrong about the text argument, but Helge is right about the erro checking.

smstroble, there's no need to declare it like that. It works fine without it.

EDIT: Ok

Edited by CoePSX

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

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...