SRL Archive - OSR Help

Help


Death12652

2010-12-07 20:39:02

This sounds like a dumb question for me to ask becuase I feel like I am stupid for not knowing this but if you have this in a procedure…


if bla bla bla then
Continue?

I want the continue to make it not do the procedure but move on in the main loop. Is there a way to do this?

NCDS

2010-12-07 20:42:06

Would be easier to help if you post the rest of the code.

traveler

2010-12-07 20:42:53

just like you have it. for example


for i:=0 to 2 do
begin
if (i=1) then
continue;
writeln(i);
end;

this will produce an output like

0
2

Death12652

2010-12-07 20:46:14

Here this may help

If InvCount = 28 then
Continue;

NCDS

2010-12-07 20:47:59

From: death12652
Here this may help

If InvCount = 28 then
Continue;


If it's in a loop, that will skip to the end of the loop. Is that your question?

Shuttleu

2010-12-07 20:48:27

you might mean Exit;

exit will get out of the current procedure/function

~shut

Death12652

2010-12-07 20:50:23

Well I tried that but it doesn't exit the procedure it exits the script.

NCDS

2010-12-07 20:53:04

From: death12652
Well I tried that but it doesn't exit the procedure it exits the script.


Be sure to use functions and procedures and not just do everything in your main loop, if that's what your doing.

Death12652

2010-12-07 20:54:21

its not in the main loop lol its at the beginning of one of my procedures.

Shuttleu

2010-12-07 20:56:21

then it should exit the procedure…
can i see your code?

~shut

Death12652

2010-12-07 21:00:12

Well I would rather not release it until I'm finished but I can give you what you need to help me.


procedure HAHA;
var
A lot of Integer variables here;
begin
Z := InvCount;
If Z = 28 then
Exit;
then a lot of other stuff
end;

begin
other stuff
repeat
HAHA;
until(InvFull = True);
other stuff
end.

TomTuff

2010-12-07 21:50:36

From: death12652
Well I would rather not release it until I'm finished but I can give you what you need to help me.


procedure HAHA;
var
A lot of Integer variables here;
begin
Z := InvCount;
If Z = 28 then
Exit;
then a lot of other stuff
end;

begin
other stuff
repeat
HAHA;
until(InvFull = True);
other stuff
end.


well tbh, that's repetitive. and another thing, that will only exit you out of haha. Also, you could just do

if (InvCount = 28) then
Exit;

Death12652

2010-12-07 21:56:16

Thats what I was trying to do and I swear on all your mothers graves (jk) that I did that and it terminated the script. Anyway I give up on my script as it just crashed and I lost all that I had.