Hacker000 Posted June 4, 2014 Share Posted June 4, 2014 (edited) I am getting a error when i run the program it says : Line 48 (Folders/and/stuff/program.au3): Func first() Error:"Func statement has no matching "EndFunc". Here's the code:- expandcollapse popup#include <ImageSearch.au3> #include <MsgBoxConstants.au3> ;---------------------------------------------------------------- Global $gX = 0 Global $gY = 0 Global $aX = 0 Global $aY = 0 Global $Runner Global $sChans Global $sFrom Global $pics = @ScriptDir & "\Pics" ;---------------------------------------------------------------- $img = "Confirm" $buttonsDir = $pics & "\Buttons" $imgExt = ".bmp" $result = _ImageSearch($buttonsDir& "\" & $img & $imgExt,1,$gX,$gY,25) ;---------------------------------------------------------------- HotKeySet("q", "SP") HotKeySet("{PAUSE}", "TogglePause") ;---------------------------------------------------------------- Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause ;---------------------------------------------------------------- Func Rounds() ToolTip("first,second,third,fourth,fifth") $sFrom = InputBox("Question", "Where do you want to start form", "first", "", _ - 1, -1, 562, 341) $sChans = InputBox("Question", "How many relms do you want to do", "10", "", _ - 1, -1, 562, 341) $Runner = $sChans For $x = 1 To $Runner Step 1 $sFrom Next EndFunc ;---------------------------------------------------------------- Func Time() ToolTip("Waiting for round to end", 0, 0) $result = _ImageSearch($buttonsDir& "\" & $img & $imgExt,1,$gX,$gY,25) EndFunc ;---------------------------------------------------------------- Func Start() Func first() MouseClick("Left",438,566);1st Sleep(1000) MouseClick("Left",680,465);Chalenge sleep(4000) MouseClick("Left",1236,559);Fight Sleep(8000) MouseMove(664,489) Do Time() Until $result = 1 If $result = 1 Then ToolTip("Round ended") MouseClick("Left",664,489);confirm Sleep(5000) Else ToolTip("Waiting") EndIf EndFunc ;------------------------------------------------------------ Func second() MouseClick("Left",558,570);2nd Sleep(1000) MouseClick("Left",680,465);Chalenge sleep(4000) MouseClick("Left",1236,559);Fight Sleep(8000) MouseMove(664,489) Do Time() Until $result = 1 If $result = 1 Then ToolTip("Round ended") MouseClick("Left",664,489);confirm Sleep(5000) Else ToolTip("Waiting") EndIf EndFunc ;------------------------------------------------------------ Func third() MouseClick("Left",681,568);3rd Sleep(1000) MouseClick("Left",680,465);Chalenge sleep(4000) MouseClick("Left",1236,559);Fight Sleep(8000) MouseMove(664,489) Do Time() Until $result = 1 If $result = 1 Then ToolTip("Round ended") MouseClick("Left",664,489);confirm Sleep(5000) Else ToolTip("Waiting") EndIf EndFunc ;------------------------------------------------------------ Func fourth() MouseClick("Left",802,574);4th Sleep(1000) MouseClick("Left",680,465);Chalenge sleep(4000) MouseClick("Left",1236,559);Fight Sleep(8000) MouseMove(664,489) Do Time() Until $result = 1 If $result = 1 Then ToolTip("Round ended") MouseClick("Left",664,489);confirm Sleep(5000) Else ToolTip("Waiting") EndIf EndFunc ;------------------------------------------------------------ Func fifth() MouseClick("Left",923,572);5th Sleep(1000) MouseClick("Left",680,465);Chalenge sleep(4000) MouseClick("Left",1236,559);Fight Sleep(8000) MouseMove(664,489) Do Time() Until $result = 1 If $result = 1 Then ToolTip("Round ended") MouseClick("Left",664,489);confirm Sleep(5000) Else ToolTip("Waiting") EndIf EndFunc EndFunc ;------------------------------------------------------------------- While 1 ToolTip("Press 'q' to begin",0,0) Sleep(100) WEnd Edited June 4, 2014 by Hacker000 Link to comment Share on other sites More sharing options...
Solution JohnOne Posted June 4, 2014 Solution Share Posted June 4, 2014 (edited) For which func? EDIT: Never mind, you are declaring functions inside another function, it's not allowed in Autoit3. Edited June 4, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 4, 2014 Moderators Share Posted June 4, 2014 Hacker000,Welcome to the AutoIt forum. Looking at the text in that script, you appear to have missed the Forum rules on your way in. Please read them - particularly the bit about not discussing game automation - before you post again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Hacker000 Posted June 4, 2014 Author Share Posted June 4, 2014 ok thx i'll find a way to work around tht problem Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now