Just a small extra question if you guys don't mind. :-)
If it runs the Profit command I would like it to start the whole script over, but if it doesn't profit after running UpperLeft, UpperRight and Lowers (which means it failed due to hitting an obstacle or something like that) it should only repeat these scripts. So far my combined procedures looks like this:
SCAR Code:
begin
EnterMaze
UpperLeft;
if(FindColor(x, y, 255, 509, 147, 533, 168))then
Begin
Fail;
end;
if(FindColor(x, y, 3895377, 747, 188, 792, 247))then
Begin
Profit;
end;
wait(500+Random(50));
UpperRight;
if(FindColor(x, y, 255, 509, 147, 533, 168))then
Begin
Fail;
end;
if(FindColor(x, y, 3895377, 747, 188, 792, 247))then
Begin
Profit;
end;
wait(500+Random(50));
Lowers;
if(FindColor(x, y, 255, 509, 147, 533, 168))then
Begin
Fail;
end;
if(FindColor(x, y, 3895377, 747, 188, 792, 247))then
Begin
Profit;
end;
wait(500+Random(50));
end.
Don't know if this is asking too much, but would be nice if you elitists at Scar could at least point me in the right direction! ;-)