Log in

View Full Version : help error



steffo2k7
09-03-2007, 01:42 PM
hemmm help please =]



error


Line 7: [Error] (22:1): Identifier expected in script C:\Program Files\SCAR 2.03\includes\sslibrary.txt







script

{Varrock Miner
by
!!!HatlessCow!!!
edited
by
creama

-Start in varock south-East Mine
-Pickaxe in first invin slot
-other pickaxes in first bank slot
-go go go
}
program VarrockSouthEastMiner;
begin
{.include sslibrary.txt}
{.include mri.txt}
{.include boxbreaker.txt}
{.include antiford.txt}

const
URL = false;//use random logging in and out?
username = '';
password = '';
LampSkill = 'mining';//Skill if get a lamp
RockType = 3;//1.Copper 2.Tin 3.Iron
RoadColor = 7896450;
BankSymbol = 5626879;
MineSymbol = 4749748;

var RockColor:integer;
Mined,sst,cst,wst,wet,awt,awth,srt,tih,tim,tis:int eger;
Stop,GetPick,log1,log2,log3,log4,log5:boolean;

procedure RandomLog;
begin
if(not log1)and((srt/60)>40)and((srt/60)<50)then
begin
log1:=true;
logout;
wait(45000+random(5000));
login(username,password);
end;
if(not log2)and((srt/60)>100)and((srt/60)<110)then
begin
log2:=true;
logout;
wait(45000+random(5000));
login(username,password);
end;
if(not log3)and((srt/60)>190)and((srt/60)<200)then
begin
log3:=true;
logout;
wait(45000+random(5000));
login(username,password);
end;
if(not log4)and((srt/60)>340)and((srt/60)<350)then
begin
log4:=true;
logout;
wait(45000+random(5000));
login(username,password);
end;
if(not log5)and((srt/60)>420)and((srt/60)<430)then
begin
log5:=true;
logout;
wait(45000+random(5000));
login(username,password);
end;
end;

procedure ProgReport;
begin
Writeln('-----===Varrock Miner By HatlessCow===-----');
Writeln('---------=====Progress Report=====---------');
cst:=getsystemTime;
srt:=(cst-sst)/1000;
tih:=srt/3600;
tim:=(srt/60)-tih*60;
tis:=srt-tim*60-tih*3600;
awth:=awth+(wet-wst);
awt:=awth/Mined;
Writeln('Worked for '+inttostr(tih)+' Hours '+inttostr(tim)+' Minutes '+inttostr(tis)+' Seconds');
Writeln('Mining 1 ore every '+inttostr(awt/1000)+' Seconds');
Writeln('Mined '+inttostr(Mined)+' Ores');
Writeln('Gained '+inttostr(Mined*35)+' xp');
if(drfordcnt>0)then writeln('Solved '+inttostr(drfordcnt)+' Dr. Ford random[s].');
if(srt>=60)then
begin
Writeln('Mining Approximately '+inttostr(Mined/(srt/60))+' Ores Per Minute');
Writeln('Mining Approximately '+inttostr((Mined/(srt/60))*60)+' Ores Per Hour');
end;
Writeln('---------=====Progress Report=====---------');
end;

procedure SetRColor;
begin
if(RockType=1)then
RockColor:=4812955;
if(RockType=2)then
RockColor:=9013650;
if(RockType=3)then
RockColor:=2503250;
end;

Procedure MouseFlag(x,y,rx,ry:integer);
begin
Mouse(x,y,rx,ry,true);
Flag;
end;

procedure bag;
begin
Mouse(651,187,3,3,true);
end;

procedure RunFF;
begin
Run(true);
MouseFlag(650,150,0,0);
wait(6000);
MouseFlag(642,19,0,0);
Run(false);
bag;
end;

procedure MiningRandoms;
begin
if(Fight)then
begin
Stop:=true;
RunFF;
end;
if(HeadGone)then
Stop:=true;
if(PickBroke)then
GetPick:=true;
findtext;
eyetest;
FindBox;
UseLamp(lampskill);
FindMiscRandoms;
if(dead)then
Logout;
end;

procedure Randoms;
begin
if(Fight)then
begin
runff;
end
findtext;
eyetest;
FindBox;
UseLamp(lampskill);
FindMiscRandoms;
if(dead)then
Logout;
end;

procedure ToBank;
var rwalk:integer;
begin
randoms;
Run(true);
Bag;
MouseFlag(694,57,2,2);
for RWalk:=0 to 2 do
begin
If(FindColorSpiral(x,y,RoadColor,602,8,679,41))the n
MouseFlag(x,y,1,1);
end;
repeat
If(FindColorSpiral(x,y,RoadColor,602,8,679,41))the n
MouseFlag(x,y,1,1);
until(FindColorSpiral(x,y,RoadColor,570,19,602,107 ))
repeat
If(FindColorSpiral(x,y,RoadColor,570,19,602,107))t hen
MouseFlag(x,y,1,1);
until(FindColorSpiral(x,y,BankSymbol,572,8,725,160 ))
If(FindColorSpiral(x,y,BankSymbol,572,8,725,160))t hen
MouseFlag(x,y,1,1);
end;

procedure ToMine;
begin
randoms;
Run(true);
Bag;
MouseFlag(692,55,3,3);
MouseFlag(708,89,3,3);
MouseFlag(675,129,3,3);
if(FindColorSpiral(x,y,RoadColor,593,24,716,107))t hen
MouseFlag(x,y,1,1);
repeat
if(FindColorSpiral(x,y,RoadColor,614,115,686,160)) then
MouseFlag(x,y,1,1);
until(FindColorSpiral(x,y,MineSymbol,572,8,725,160 ))
If(FindColorSpiral(x,y,MineSymbol,572,8,725,160))t hen
MouseFlag(x,y,1,1);
end;

procedure Bank;
begin
randoms;
OpenBank;
Deposit(1,1,1);
DepositAll;
Withdraw(1,1,1);
CloseWindow;
randoms;
end;

procedure findblack;
begin
x:=0
y:=0
if(findcolorspiral(x,y,0,40,119,211,264)then
begin
eyetest;
end;
end;

Function FindRock:boolean;
begin
if(FindObj('Mine',rockcolor,5))and(not(GasFound(ro ckcolor)))then
result:=true;
end;

procedure MineRock;
var tx,ty,qx,qy,ifail,itrack:integer;
begin
Stop:=false;
ifail:=0;
if(FindRock)then
begin
Mouse(x,y,4,4,true);
tx:=x; ty:=y;
repeat
wait(100+random(600));
FindColorSpiralTolerance(tx,ty,RockColor,tx-10,ty-10,tx+10,ty+10,5)
if(not(FlagPresent))then
itrack:=itrack+1;
until(not(FlagPresent))and(itrack>=20)
repeat
ifail:=ifail+1;
wait(150+random(400));
MiningRandoms;
until(ifail>45)or(Stop)or(GetPick)or(InventoryCount=28)or(not( FindColorSpiralTolerance(qx,qy,RockColor,tx-10,ty-10,tx+10,ty+10,5)))
end;
end;

begin
LoadLibrary('Internet Explorer');
LoadMRI;
SetRColor;
Run(false);
SetBrightness('vbright');
SetChat('off');
Bag;
GetHeadColorPick;
sst:=getsystemtime;
repeat
wst:=getsystemtime;
repeat
MiningRandoms;
findblack;
MineRock;
MiningRandoms;
until(GetPick)or(InventoryCount=28)
wet:=getsystemtime;
Mined:=Mined+InventoryCount-1;
ProgReport;
randoms;
ToBank;
Bank;
ToMine;
if(URL)then
RandomLog;
until(false)
end.

zertunami
09-03-2007, 01:56 PM
Well, I'm no expert on scripting but this seems to be the problem:


{Varrock Miner
by
!!!HatlessCow!!!
edited
by
creama

-Start in varock south-East Mine
-Pickaxe in first invin slot
-other pickaxes in first bank slot
-go go go
}

It should be more organized to some thing like this:


///////////////////////////////////////////////////////////////////////////////////////
//Varrock Miner //
// by //
//!!!HatlessCow!!! //
// edited //
// by //
// creama //
// //
//-Start in varock south-East Mine //
//-Pickaxe in first invin slot //
//-other pickaxes in first bank slot //
//-go go go //
////////////////////////////////////////////////////////////////////////////////////

Opal Tasty
09-03-2007, 02:01 PM
Well first off, you shouldn't be using Scar 2.03 and second thats not an SRL script.