SRL Archive - Help

Why does this procedure loop for ever?


Drax

2012-01-26 01:43:27

 procedure Resting;
var
s: String;
begin
if not loggedin then exit;
FindNormalRandoms;
Report;
Antiban;
DidRedClick;

begin
if (Not runenergy(50)) then
begin
Repeat
Report;
Until (RestUntil(RandomRange(90,100)));
end;
end;
end;


This procedure was working fine yesterday but today it just does continuous loops for ever. It's like the procedure doesn't know when the energy has reach the set percent.

I was thinking it's a SRL problem, can someone help please.

RyGuy

2012-01-26 01:46:56

Why are you calling DidRedClick without actually clicking on anything?

Flight

2012-01-26 01:49:11

"RestUntil" itself already creates a loop within the function that rests (waits) until you're at your desired energy. So putting a function with a preexisting loop inside of a loop… doesn't make alot of sense, does it?

Try this instead:

procedure Resting;
var
S: String;
begin
if not loggedin then exit;
FindNormalRandoms;
Report;
Antiban;
DidRedClick; //Why?

if (GetMMLevels('run', S) <= 50) then
RestUntil(RandomRange(90,100))
end;

Drax

2012-01-26 07:25:02

From: Flight
"RestUntil" itself already creates a loop within the function that rests (waits) until you're at your desired energy. So putting a function with a preexisting loop inside of a loop… doesn't make alot of sense, does it?

Try this instead:

procedure Resting;
var
S: String;
begin
if not loggedin then exit;
FindNormalRandoms;
Report;
Antiban;
DidRedClick; //Why?

if (GetMMLevels('run', S) <= 50) then
RestUntil(RandomRange(90,100))
end;


Yeah i don't know why i put didredclick in there lol, thanks for the help.