Jump to content
Sign in to follow this  
zeusxdd

Variable used without being declared. - (Locked)

Recommended Posts

Hey guys im trying to make a bot ( newbie ), i have a error that says variable used without being declared even if i declared it. Can you guys help me?

My code
 

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ImageSearch.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 125, 71, 192, 124)
$Button1 = GUICtrlCreateButton("Starten", 24, 40, 75, 25)
$Label1 = GUICtrlCreateLabel("ZEUS BOT XDD", 16, 16, 84, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
         Case $Button1
         botbaslat()
    EndSwitch
 WEnd

Global $x, $y

 Func botbaslat()
    WinActivate("#mein-herz-in-flammen - Discord")
   Local $search = _ImageSearch('ses.png',0,$x,$y,10)
   if $search = 1 Then
   MouseClick("left")
 Else
      MsgBox(0,"Error", "Error")
      EndIf
    EndFunc

Error that im getting: 

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\scripts\denemexdd\lollebotte.au3"    
"D:\scripts\denemexdd\lollebotte.au3" (27) : ==> Variable used without being declared.:
Local $search = _ImageSearch('ses.png',0,$x,$y,10)
Local $search = _ImageSearch('ses.png',0,^ ERROR
>Exit code: 1    Time: 5.835

 

Share this post


Link to post
Share on other sites
2 minutes ago, zeusxdd said:

i will do it for a game.

Which is against Forum Rules :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...