Jump to content

Little Probelem - Quick Question


mcfr1es
 Share

Recommended Posts

in a certain part of my script, I have a function that is set up like so:

Func Blah

For ----
For ----

   If BlahBlahBlah Then
      If BlahBlahBlah Then
         If BlahBlahBlah Then
             xxxxxxxxxxxxx
         Elseif BlahBlahBlah Then
             xxxxxxxxxxxxx
         Elseif BlahBlahBlah Then
             xxxxxxxxxxxxx
         Endif
      Endif
    ENdif

   If BlahBlahBlah Then
      If BlahBlahBlah Then
         If BlahBlahBlah Then
             xxxxxxxxxxxxx
         Elseif BlahBlahBlah Then
             xxxxxxxxxxxxx
         Elseif BlahBlahBlah Then
             xxxxxxxxxxxxx
         Endif
      Endif
    ENdif

   If BlahBlahBlah Then
      If BlahBlahBlah Then
         If BlahBlahBlah Then
             xxxxxxxxxxxxx
         Elseif BlahBlahBlah Then
             xxxxxxxxxxxxx
         Elseif BlahBlahBlah Then
             xxxxxxxxxxxxx
         Endif
      Endif
    ENdif

Next---
Next---

EndFunc

I want to break out of the function if one of the "xxxxxxxxxxx" parts are reached..

I know that exitloop only breaks out of do/for/while loops

I tried to use ExitLoop 2 but I dont believe it works... Am I correct on this matter (that ExitLoop 2 doesnt work) and if so what else can I use? to break out of the function

Note: I know that I can combine my first two "if" statements in each group but i choose to not do so for legibility purposes

Edited by mcfr1es

Roger! You son of a big pile o' Monkey Nuts.

Link to comment
Share on other sites

Mistake on my part, there is no while in my script.... changing first post now

and ill use return, strangely i havent used it before:

would I use it like this -> return or return()

Edited by mcfr1es

Roger! You son of a big pile o' Monkey Nuts.

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