AutoChris Posted March 22, 2004 Share Posted March 22, 2004 Is it possible to end a function without ending the script?I have a script with multiple functions. The problem I am having is that I want a particular function to end if there is an error but leave the script running so other functions can be called.If I put "Exit" after the If statement then the whole script terminates. If I try "EndFunc" then I get an error message saying that I'm missing the "EndIf" statement. What can I do to make this possible? Here is part of my script with the Exit option...Func Program() $name = Inputbox("File name", "What do you want to call the file?", "") If @error = -1 Then Exit EndIfEndFunc Link to comment Share on other sites More sharing options...
dmbech Posted March 22, 2004 Share Posted March 22, 2004 Just use Return instead of Exit Link to comment Share on other sites More sharing options...
AutoChris Posted March 22, 2004 Author Share Posted March 22, 2004 Ahhhh.... I knew it was something stupid! Thanks a lot, dmbech! :iamstupid: 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