SRL Archive - OSR Help

TPA problem


Grimtoker

2011-12-22 04:22:24

I'm learning to put TPA's into my script to find an object and even though it finds the object and clicks it, i'm still experiencing another problem. The script will for some reason keep repeating the procedure instead of moving onto the next one like it should do.

The code is below, how can I make it stop repeating the procedure and move onto the next? I thought Exit; would stop it?

Procedure BranchUp;
Begin
AntiRandoms;
AntiBan;
begin
FindColorsTolerance(MyTPA, 999018, 150, 129, 363, 272, 10);
for i := 0 to High(MyTPA)do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 5, 5);
if (IsUpTextMultiCustom(['ranch', 'ree'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('og');
Wait(500+random(250));
Exit;
end;
Wait(6500+Random(500));
WriteLn('Branch done..');
end;
end;
End;

YoHoJo

2011-12-22 04:24:17

You're looking for the thing you press on when you need to slow down your car!
So the answer is!?

Grimtoker

2011-12-22 04:25:47

From: YoHoJo
You're looking for the thing you press on when you need to slow down your car!
So the answer is!?


lol sorry YoHo but I've been up most of the night and it's now almost 9.30am.. too tired for your riddles ;)

What is the answer? :p

YoHoJo

2011-12-22 04:27:14

It's barely even a riddle! Please!!
What do you press on to slow down your car!?
You also squeeze this on a bike to slow it Down !

BraK

2011-12-22 04:27:26

Exit should stop it. but for giggles try swapping exit for break. he would have spelled it wrong at the least yohojo ;) Brake is not Break :p

Grimtoker

2011-12-22 04:28:44

From: YoHoJo
It's barely even a riddle! Please!!
What do you press on to slow down your car!?
You also squeeze this on a bike to slow it Down !


Hahaha Break!!!!?

Swap Exit for Break? haha sorry guys. :duh:

YoHoJo

2011-12-22 04:29:30

Damnit brak! I hate you!
The answer is…
Break;
Break stops loops like while do, for to do, repeat until, etc.

I think exit only stops whatever is after it between the begin and end, but not loops!



Hooray he got it!

Grimtoker

2011-12-22 04:34:53

Hahah thanks for the help and information both.

Hopefully will have several working TPA's for my script soon :)