StooJ Posted December 3, 2007 Posted December 3, 2007 (edited) I have a script with few functions included. However, sometimes for some reason or another they won't work, depending on the PC. Is there a way of breaking out of the function? I want to get out of the function, but not out of the whole script. If $Test = False Then ExitFunction EndIf Lots of other stuff If $Test2 = False Then ExitFunction EndIf More stuff EndFunc I realise I could maybe nest the whole thing in an If statement, but there are several unrelated conditions that might cause the function to fail, & they occur at several seperate sections throughout the function so I can't really see how it would nest. Sorry if I'm missing something obvious here. Thanks for your help. -----------EDIT------------ Really sorry about this. I just tried using the Return command and it worked a treat. Edited December 3, 2007 by StooJ
JustinReno Posted December 3, 2007 Posted December 3, 2007 I think you could use Exitloop but I'm not sure. Check the help file on Exitloop.
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