SRL Archive - OSR Help

Why dont u work! :(


beats-

2011-03-31 21:42:08


procedure MainLoop;
begin
If (Not LoggedIn) Then LoginPlayer;
Repeat
Repeat
EatLob;
until(InvEmpty)
until(false)
Logout;
end;

Stuck on eating.
It's meant to see inv is empty.. and then logout!
i dont need to make a function for invempty do i?
like its an srl include thingy.. right..? :D

Sex

2011-03-31 21:47:09

Um, what? :p
Try this
procedure MainLoop;
begin
if not LoggedIn then
LoginPlayer;
repeat
EatLob;
until(InvEmpty);
Logout;
end;

beats-

2011-03-31 21:59:05

=\ yeah.. ill make sure to look for extra repeat etc next time.
thx man :)

HyperSecret

2011-03-31 23:19:51

It was the nature of the outer repeat that was wrong. Anytime you have a

Repeat
Until(false)

You enter what is called an infinite loop unless you somehow break out of it using 'break'. This is usually done by seeing if some condition is met (if statement) and then breaking because of it.