Jump to content

Function not working


Recommended Posts

The goal is to make this a module into a function but its not working 
I'm not sure on, how to make it a function 

 

Func Loopy()
HotKeySet("{Esc}", "_Exit")
$Jock = HotKeySet("{Esc}", "_Exit")
$Jobby =
;Jobby = 1000 (1000 is one second in miliseconds)
$Startup = Send("{F5}")
WHile 1
Send("While loop practice")
Sleep("jobby")
WEnd
Func _Exit ()
    Exit
EndFunc
EndFunc

The " Func Loopy() " was an attempt to making this a function 
-------------------------------------------------------------------------------------------------------------------------------
image.png.7e97b8cba88a6be5f63b16f273279e0d.png

It keeps saying I have no matching function so its got me confused because I made a function its the " Func _Exit ()"

Edited by IcantCodeHelp
Link to comment
Share on other sites

  • Moderators

The error is telling you what is wrong. Likewise, as has been suggested several times now, if you would actually crack open the help file and read, you would be able to answer your own questions:

 

Quote

From the help file under Func...Return...EndFunc:

Note that function declarations cannot appear inside other function declarations.

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@IcantCodeHelp, seriously?!

  • #1 Open Help File
  • #2 Click Search
  • #3 Type in variables
  • #4 Find the info you seek right in front of you

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Yes, it won't if you don't open the help file, tricky little bugger.

Seriously, you need to start putting in some work on your own. This forum has a ton of people willing to help, but we do not spoon feed answers to you. You will start seeing the amount of help you receive drop off if you don't begin showing at least a modicum of effort.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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