Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 23:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Badly formatted Func statement-Error

Discussion on Badly formatted Func statement-Error within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1


 
Status's Avatar
 
elite*gold: 11
Join Date: Feb 2010
Posts: 8,312
Received Thanks: 4,589
Badly formatted Func statement-Error

Hiho,

ich wollte grade anfangen, oder habe angefangen, einen kleinen Aimbot in AutoIt zu programmieren/coden (wie auch immer) naya, als ich ihn dann gestartet habe, kamm wie im Titel schon zu sehen, ein Error nämlich:

"Badly formatted Func statement"

Nun wollte ich mal fragen, ob jmd. hier eine Lösung weiß

Hier mal der Code:

HTML Code:
HotKeySet ("{F6}","_Exit")

While 1
	$Variable = PixelSearch (866,412,1450,720,0x889DB2)
	If IsArray($Variable) = True Then
		MouseMove($Variable [0], $Variable [1], 1)
		MouseClick("left")
	EndIf
Wend

Func Exit()
	Exit
EndFunc
Und hier mal der ganze Error :

HTML Code:
>"C:\Programme\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Dokumente und Einstellungen\xx\Eigene Dateien\Bot.au3"    
C:\Dokumente und Einstellungen\xx\Eigene Dateien\Bot.au3 (11) : ==> Badly formatted "Func" statement.:
Func Exit()

>Exit code: 1    Time: 0.221
Schonmal Danke für alle sinvollen Posts

=> Bitte kommt jetzt nicht mit, das kann doch jeder etc. das ist mein erstes Script, ich habe also nicht so die große Ahnung.

greetz
Status is offline  
Old 09/12/2010, 10:02   #2
 
elite*gold: 0
Join Date: Feb 2010
Posts: 194
Received Thanks: 176
die funktion exit() is dran schuld. wenn du sie _exit() nennen würdest sollts wieder funktionieren. Exit darf nicht als funktionsname verwendet werden
iDunnoi is offline  
Old 09/12/2010, 10:10   #3


 
Status's Avatar
 
elite*gold: 11
Join Date: Feb 2010
Posts: 8,312
Received Thanks: 4,589
Schonmal Danke, der Error erscheint jetzt nicht mehr.

Aber funktionieren tut es trotzdem nicht

Kann es vill. an den Pixel/Farb-Angaben liegen ?

Nur mal nebenbei, falls das helfen sollte, es dreht sich um dieses Spiel (Browsergame)

Status is offline  
Old 09/12/2010, 11:00   #4
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
farbe: 0xFF3300
omer36 is offline  
Old 09/12/2010, 11:50   #5


 
Status's Avatar
 
elite*gold: 11
Join Date: Feb 2010
Posts: 8,312
Received Thanks: 4,589
Ah ty, klappt nun wunderbar

Nun möchte ich den Bot aber in einem online Shooter einsetzten, damit ich den Bot kontrollieren kann, wären ein An/Aus Schalter ganz nett.

Ich habe schon versucht, neben dem HotKeySet Exit, noch einen mit Start hinzuzufügen, was aber nicht geklappt hat ~.~

Hat jmd. vill. eine Lösung ?
Status is offline  
Old 09/12/2010, 12:22   #6
 
elite*gold: 0
Join Date: Mar 2010
Posts: 79
Received Thanks: 32
Sollte eigentlich so klappen:

PHP Code:
HotKeySet("{F6}""_Start")
HotKeySet("{F7}""_Pause")
HotKeySet("{F8}","_Exit")


While 
1
    $Variable 
PixelSearch (866,412,1450,720,0xFF3300)
    If 
IsArray($Variable) = True Then
        MouseMove
($Variable [0], $Variable [1], 1)
        
MouseClick("left")
    EndIf
Wend

Func _Start
()
    While 
1
    $Variable 
PixelSearch (866,412,1450,720,0xFF3300)
    If 
IsArray($Variable) = True Then
        MouseMove
($Variable [0], $Variable [1], 1)
        
MouseClick("left")
    EndIf
Wend
EndFunc

Func _Pause
()
    While 
1
        Sleep
(100)
    
WEnd
EndFunc

Func _Exit
()
    Exit
EndFunc 
luckkylooser is offline  
Old 09/12/2010, 12:47   #7


 
Status's Avatar
 
elite*gold: 11
Join Date: Feb 2010
Posts: 8,312
Received Thanks: 4,589
Da bekomme ich nur folgenden Error:

Code:
>"C:\Programme\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Dokumente und Einstellungen\xx\Eigene Dateien\Bot.au3"
Aber auf jeden Fall schonmal Danke für die Hilfe ^^
Status is offline  
Old 09/12/2010, 13:04   #8
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
F1 = start/pause

PHP Code:
HotKeySet("{ESC}""_exit")
HotKeySet("{F1}""_start")

Global 
$play True
Global $start False

While $play
    
If $start Then
        $Variable 
PixelSearch(866,412,1450,7200xFF3300)
        If 
IsArray($Variable) = True Then
            MouseMove
($Variable [0], $Variable [1], 1)
            
MouseClick("left")
        EndIf
    EndIf
WEnd

Func _start
()
    
$start Not $start
EndFunc

Func _exit
()
    
$play False
EndFunc 
omer36 is offline  
Old 09/12/2010, 13:14   #9


 
Status's Avatar
 
elite*gold: 11
Join Date: Feb 2010
Posts: 8,312
Received Thanks: 4,589
Ich kriege keine Error Meldung, aber funken tut es trotzdem nicht.
Auch der alte Code funktioniert nicht mehr, weiß einer wodran das liegen könnte ?

Danke schonmal für eure Mühe :x
Status is offline  
Old 09/12/2010, 13:17   #10
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
wie funzt nicht mehr?
gehts direkt wieder aus? oder läuft es und passiert einfach nix?

stimmt die posi noch oder hast du dein fenster vllt verschoben?
866,412,1450,720

auch dran gedacht F1 zum "start" zu drücken? ^^
omer36 is offline  
Old 09/12/2010, 13:49   #11


 
Status's Avatar
 
elite*gold: 11
Join Date: Feb 2010
Posts: 8,312
Received Thanks: 4,589
Ah wunderbar, Tatsache, die Posi. wars :P

Ty^^.

Bzw. eine Bitte hätte ich noch.
Die Schritte, die du benutzt hast, um den An/Aus Schalter einzufügen, könntest du die mir vill. erklären ?
Bringt mir ja nichts, wenn ich das Script habe, es aber nicht verstehe .

Danke schonmal
Status is offline  
Reply


Similar Threads Similar Threads
[HELP]Func -> Syntax Error
07/10/2010 - AutoIt - 13 Replies
Huhu Com.. Ich wollte mir mal einen kleinen Bot machen... Aber bei "Func" kommt immer diese Fehlermeldung... http://img804.imageshack.us/img804/7364/screensho t1.jpg Bin dankbar für jede hilfe :) p.s: ja, am Ende hab ich auch ein "EndFunc"
Problem | Excel save's csv files formatted?
11/10/2009 - Dekaron Private Server - 9 Replies
Whem i'am editing lets say monsters.csv for changing the exp/drops, i'am saving it and the size of monsters.csv is automutically changed and Dekaron Server crashes onloading of "Monsters" and the same happens with all the other csv files... Some help guys? how do you edit CSV files cause Notepad is SUCKS and you can't see a word there..
Need ur help badly!!
01/18/2008 - General Gaming Discussion - 1 Replies
Well, i have googled 2 hours and couldnt find any program which can open the 2moons PAK file (located in \Acclaim\2Moons\Data). If you find any program (please TEST it, i had 30 programs, but none worked) share with me. wMaxLevel ,160 wMinLevelToLoseExp ,0 byStatPointPerLevel ,20 wDropMaxDistance ,150 fItemRatio ,0.5 fSTRDamageRatio ,1.0 fDEXDamageRatio ,0.4
NEED HELP!!!!!!!! BADLY
12/13/2006 - Conquer Online 2 - 16 Replies
CAN ANY1 TELL ME HOW TO GET CO TO WORK...MY SHIT HAS BEEN DOWN FOR A DAY NOW....FUCKING UNDER MAINTAINACE ERROR.....I SYSTEM RESTORED AND DOWNLOADED CO OVER & OVER N I GET THE SAME FUCKING ERROR.PLS SUM1 TELL ME HOW THE FUCK I CAN GET BACK ON



All times are GMT +1. The time now is 23:37.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.