SRL Archive - OSR Help

end procedure where as and go to new procedure


rsbots2013

2013-05-26 02:41:43

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

Chris!

2013-05-26 03:15:29

In your procedure:

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.'):

begin
SetupSRL;
OtherStuff;
DoStuff1;
DoStuff2;
end.

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