first of all, you miss typed the scar tags
they have to be like this:[SC AR][/SC AR] (Remove spaces in the SCAR's) I'll read it over and see if I can fix the problem for you.
Edit heres the script working version:
SCAR Code:
program AutoMiner;
{.include SRL/SRL.scar}
var
Clicks: Integer;
Loads: Integer; //don't need this, but it doesen't hurt script so i left it.
const
aorb=('a');// a is iron, b is coal
IronColour= 2701145;
CoalColour= 2636603;
procedure Proggy;
begin
ClearDebug;//put this here so it clears debug each time it writes proggy
Writeln('[]========================================[]');
Writeln('---------------->Our Proggy<----------------');
Writeln(' did ' + IntToStr(Loads) + ' Loads' + ' ');
Writeln('[]========================================[]');
end;
Function FindIron: Boolean;
begin
if(aorb=('a'))then
x:=256;y:=174;
if(FindColorspiralTolerance(x, y, IronColour, 0, 0, 515, 337, 2))then
begin
Result := True;
Writeln('Fount Some Iron');
wait(1000+random(500));
end else
Writeln('Were Is That Iron?');
wait(1000+random(500));
end;
Function FindCoal: Boolean;
begin
if(aorb=('b'))then
x:=256;y:=174;
if(FindColorspiralTolerance(x, y, CoalColour, 0, 0, 515, 337, 2))then
begin
Result := True;
Writeln('Fount Some Coal');
wait(1000+random(500));
end else
Writeln('Were Is That Coal?');
wait(1000+random(500));
end;
Function MoveMouseToIron: Boolean;
begin
Repeat
if aorb=('b')then
Exit;
if(FindIron) Then//there is no procedure for find rock,FindIron or FindCoal
begin
Result := True;
MMouse(x, y, 2, 2);
Wait(50+random(100));
Mouse(x, y, 2, 2,true); //this clicks rock without needing second function
end;
until (InvFull)
end;
Function MoveMouseToCoal: Boolean;
begin
Repeat
if aorb=('a')then
Exit;
if (FindCoal) then
begin
Result := True;
MMouse(x, y, 2, 2);
Wait(50+random(100));
Mouse(x, y , 2, 2,true);
end;
until (InvFull)
end;
{procedure ClickIron; ////// /
begin /
/
if (MoveMouseToIron = true) then/
begin /
aorb=('a'); /
Mouse(x, y, 2, 2, True) /
Wait(3500+random(100)); /
end; /
end; /
/
procedure ClickCoal; /
begin /
/
if (MoveMouseToCoal = true) then /
begin /
aorb=('b'); /
Mouse(x, y, 2, 2, True) /
Wait(3500+random(100)); /DONT need all this because
end; /we made it clicks mouse above
end;}
Procedure Dropores;
begin
DropTo(2,28);
Loads:=Loads+1;
end;
begin
setupsrl;
repeat
FindCoal;
FindIron;
Dropores;
Proggy; //put it here because it clears debug every time it writes new one
until(False)
end.
If you are going to use this script, I would like some credits for helping you do this 
Nice Job though, you just still need to learn about main loops and things like that. you don't need/can't have 2 main loops like you were trying to do. look this script over and look at why/how i changed things. you'll get it.