OK I have this strange error in my script: Line 1: [Error] (1:1): Variable Expected in script. and with help of Pentti we found out in which part of the script the error was. Here it is(DONT STEAL IT CUZ I WORKED HARD ON IT):
SCAR Code:
program New;
{.include SRL/SRL.scar}
{.include SRL/SRL/extended/xAutoTalk.scar}
{.include SRL/SRL/extended/xAntiBan.scar}
{.include SRL/SRL/skill/Mining.scar}
var
gx, gy: integer;
const
MineCoalTime = 5; //(Seconds)
CoalColor1 = 432423;
CoalColor2 = 432433223;
CoalColor3 = 4544665423;
CoalColor4 = 4398673;
CoalTol1 = 1;
CoalTol2 = 2;
CoalTol3 = 3;
CoalTol4 = 4;
procedure CheckPick;
begin
if(FindPick)then
begin
// if(FearlessDebug)then Writeln('Found pickaxe.');
end else
begin
Writeln('Can''t Find(useable)Pick');
Writeln('Switching to next player.');
Players[CurrentPlayer].loc:= 'NoPick';
// PlayerProgressReport;
NextPlayer(False);
end;
end;
procedure CheckFight;
begin
if(FindFight)then
begin
RunAwayDirection('N');
wait(13000);
RunBack;
//FightsPlayer:= FightsPlayer+1;
//FightsTotal:= FightsTotal+1;
end;
end;
procedure CheckGas;
begin
if(GasColors(gx, gy))then
begin
//GassesPlayer:= GassesPlayer+1;
//GassesTotal:= GassesTotal+1;
Writeln('Gas found');
end;
end;
function FindFastRandoms: Boolean; //Credits to: WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 10 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := False;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: If RC Then
Result := True;
9: if FindTalk then
Result := True;
{10: If HandleTrade Then
Result := True; }
end;
wait(1);
end;
end;
procedure FckRandoms;
begin
FindNormalRandoms;
FindFastRandoms;
end;
procedure MineCoal;
var
MCMark1, MCMark2: integer;
tries: integer;
begin
Tries:= 0;
repeat
CheckFight; //Fight
if(FindObjOre2(x, y, 'ine', CoalColor1, CoalTol1, 4))or
(FindObjOre2(x, y, 'ine', CoalColor2, CoalTol2, 4))or
(FindObjOre2(x, y, 'ine', CoalColor3, CoalTol3, 4))or
(FindObjOre2(x, y, 'ine', CoalColor4, CoalTol4, 4))then
begin
MMouse(x, y, 3, 3)
CheckGas; //Gas
wait(50+random(100));
end else
begin
Tries:= Tries+1;
end;
until(IsUpTextMulti('ine','ock','Mine'))or
(Tries= 50)
if(Tries= 50)then
begin
Writeln('Couldn''t find the Coal Ore.')
Players[CurrentPlayer].loc:= 'Failed FindCoal'
// PlayerProgressReport;
NextPlayer(False);
end;
if(IsUpTextMulti('ine','ock','Mine'))then
begin
if(Random(20) < 17)then
begin
Mouse(x, y, 0, 0, true);
Flag;
if(InChat('no ore curr'))then
begin
FckRandoms;
MineCoal;
end;
MarkTime(MCMark1);
end;
repeat
CheckGas; //Gas;
CheckPick;
wait(50);
FckRandoms; //Anti-Randoms
wait(50);
CheckPick; //PickAxe
wait(50);
FindFight; //Fight;
until(InChat('ou manage'))or
(TimeFromMark(MCMark1 >= MineCoalTime*1000))
end else
begin
Mouse(x, y, 0, 0, false);
ChooseOption(x, y, 'Mine');
Flag;
if(InChat('no ore curr'))then
begin
FckRandoms;
MineCoal;
end;
MarkTime(MCMark2);
repeat
CheckGas; //Gas;
CheckPick;
wait(50);
FckRandoms; //Anti-Randoms
wait(50);
CheckPick; //PickAxe
wait(50);
FindFight; //Fight;
until(InChat('ou manage'))or
(TimeFromMark(MCMark2 >= MineCoalTime*1000))
if(InChat('ou manage'))then
begin
// if(FearlessDebug)then Writeln('Mined a Coal Ore');
OresMinedPlayer:= OresMinedPlayer+1;
OresMinedTotal:= OresMinedTotal+1;
end;
if(TimeFromMark(MCMark2) >= MineCoalTime*1000)then
begin
Writeln('It took to long to mine the Coal Ore.');
Writeln('Switching to next player.');
Players[CurrentPlayer].loc:= 'Failed MineCoal';
// PlayerProgressReport;
NextPlayer(False);
end;
end;
end;
begin
MineCoal;
end.
I made of the part that didn't worked a small script and it gives the same error so it really is that part. Can someone fix the error??
Thanks