SCAR Code:
procedure WalkToRuinsFromGate;
var
x, y: integer; Point5, Point6, Point7 : Boolean;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Point5 := True;
Point6 := True;
Point7 := True;
if not DTMRotated(DTMPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
if not FindSymbolIn(x, y, 'Rare Trees', MMX1, MMY1, 641, 6) then
if FindRoadColor > 0 then
if FindFallyRoadColor > 0 then
RadialRoadWalk(FindRoadColor, 180, 220, 20, 0, 0);
FFlag(0);
if FindSymbolIn(x, y, 'Rare Trees', MMX1, MMY1, 641, 6) then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
Point5 := False;
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then
Point5 := True;
end;
end;
if Point5 = True then
begin
Mouse(x, y, 1, 1, True);
FFlag(10);
end;
if not DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
if FindSymbol(x, y, 'Water source') and Point6 = True then
begin
Mouse(x, y+120, 3, 3, True);
FFlag(0);
Point6:=False;
end;
if FindSymbol(x, y, 'Spinning wheel') and Point6 = True then
begin
Mouse(x, y+120, 3, 3, True);
FFlag(0);
Point6:=False;
end;
end;
if Point6 = True then
begin
Mouse(x, y, 1, 1, True);
FFlag(5);
end;
if not DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
writeln('Backup for this comes in v.95');
NextPlayer(False);
Point7 := False;
Exit;
end;
if Point7 = True then
begin
Mouse(x, y, 1, 1, True);
FFlag(5);
Exit;
end;
end;
I know that you can go through procedures to stop this from happening, but this is really frustrating me. Everything is declared, but it always gives me a runtime error just as I'm getting finished, and it shouldn't be that unstable in my mind.