i made it compile
Simba Code:
{$i SRL/SRL.scar}
procedure MineRocks;
begin
end;
procedure SetupMineRocks;
var
X, Y, i, ii: integer; // ii added
RockColor: array[0..3] of integer;
RockType: String;
begin
if (RockType = 'iron') then
begin // missing a begin here
writeln('Mining iron ore.');
RockColor[0]:=0;
RockColor[1]:=0;
RockColor[2]:=0;
RockColor[3]:=0;
end else // need to use end else here
if (RockType = 'tin') then
begin
writeln('Mining tin ore.');
RockColor[0]:=0;
RockColor[1]:=0;
RockColor[2]:=0;
RockColor[3]:=0;
end else // same as before
if (RockType = 'copper') then
begin
writeln('Mining copper ore.');
RockColor[0]:=0;
RockColor[1]:=0;
RockColor[2]:=0;
RockColor[3]:=0;
end;
// begin not needed
if(not(LoggedIn)) then
Exit;
// else not needed
For i:= 0 to 5 do
for ii:=0 to 3 do // this is needed to stop a out of range error as there are only 4 RockColors
if(FindObjCustom(x,y,['ine','in','ne','ocks','ock'],[RockColor[ii]],6)) then // missing a closing bracket
begin
if IsUpText('ocks') then
begin
MineRocks;
end;
end;
end;
begin
SetupMineRocks;
end.
i would suggest breaking it up into smaller procedures like a LoadRock, also learning about cases would help
something like this
Simba Code:
procedure LoadRockRecord;
var
RockColor: array[0..3] of integer;
begin
case Lowercase(RockType) of
//case Lowercase(Players[CurrentPlayer].Strings[0]) of // i would suggest uing something like this so you only have to use
// this proc once at the beggining of your script
'iron':
begin
RockColor := [0, 1, 2, 3]; // put rock colours here
end;
'tin':
begin
RockColor := [0, 1, 2, 3];
end;
// etc for each rock
end;
end;
also your standards are a little bit off, its no big deal but it makes it alot easier to read and you can find little errors like an extra begin/end somewhere
i hope this helps a little