Results 1 to 2 of 2

Thread: end procedure where as and go to new procedure

  1. #1
    Join Date
    Mar 2013
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default end procedure where as and go to new procedure

    How do I tell my script to immediately end the procedure it's in and go to another procedure?

  2. #2
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

    Default

    In your procedure:

    Simba Code:
    procedure DoStuff1;
    begin
      FindNormalRandoms;
      if (FindSomething) then
        Exit;  //If finds it - exits procedure then in mainloop 'DoStuff2' comes after it.
      if not (FindSomething) then
      begin
        LookForSomething;
        Wait(500);
      end;
    end;

    procedure DoStuff2;
    begin
      Blahblahblah;
    end;

    In your mainloop (you can see it's the mainloop because it ends in an 'end.'):

    Simba Code:
    begin
      SetupSRL;
      OtherStuff;
      DoStuff1;
      DoStuff2;
    end.

    May or may not work, different ways to do it also.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •