groaning dragon
08-27-2007, 04:15 PM
Again, im new and trying to learn how to auto, and create..... I am trying to run a script that keeps giving me this error, what can i do to stop this and make the scrpit work? p.s. just like many problems ppl are having, is this cause the script isnt compatible with srl 4 ? help is greatly appreciated. i have had limited success and havent managed to get a successful script that doesnt need editing... if u have one of those please leave link, thanks! :)
Line 16: [Error] (15345:1): Duplicate identifier 'x' in script C:\Documents and Settings\Compaq_Owner\Desktop\OreSmasherV0[1].2.scar
here is the script itself
program OreSmasher;
{ Post errors on the thread }
{ Declare players in lines 14-24 }
{ Set ore colour line 27 }
{ Must Set ore color or will get errors }
{credit to jukka, helped me with compiling & fixing some things}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
Const HowManyLoads = 99;// set how many loads to do
var
color : integer ;
x,y,Q, B : integer ; THIS IS WHERE THE ERROR IS, HELP PLEASE
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers)1;
CurrentPlayer := 1;
Players[0].Name :='sbgbs'; //Rs username
Players[0].Pass :='ssvsvr'; //Rs password
Players[0].Nick :='rngbs'; //Nickname ex heyidiot nickname would be yid
Players[0].Active := True;
Players[1].Name :='fghgfh';
Players[1].Pass :='gfhfh';
Players[1].Nick :='fghgfh';
Players[1].Active := True;
end;
procedure Signature;
begin
Writeln('OreSmasher');
Writeln('Created By Dangerous Garden Tools');
Writeln('Please Post All Errors On My Thread');
Writeln('So That I Can Improve The Script!');
Writeln('Enjoy');
end;
function OreColors: integer;
begin
result := 8829397; //color of the ore goes here
end;
procedure CheckFight;
begin
If(Not Loggedin)Then Exit;
if(FindFight)then
begin
RunAwayDirection('N');
wait(13000);
RunBack;
end;
end;
Function FindGass: Boolean;
begin
If(Not Loggedin)Then Exit;
if FindGas(x,y)then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
result:= true;
end;
end;
Procedure MineTheRock;
begin
If(Not Loggedin)Then Exit;
if FindColorTolerance(x,y,OreColors,MSX1,MSY1,MSX2,MS Y2,15)then
begin
FindNormalRandoms;
If(FindGass)Then Exit;
mouse(x,y,3,4,true)
sleep(6000)
CheckFight;
end;
end;
Procedure Drop;
var
B : integer;
begin
If(Not Loggedin)Then Exit;
FindNormalRandoms;
CheckFight;
B := 1;
repeat
MMouseItem(B);
If IsUpText('re')then
begin
DropItem(B);
end;
B := B + 1;
until(B > 27);
end;
Procedure Mining;
begin
If(Not Loggedin)Then Exit;
repeat
If(Not Loggedin)Then Exit;
MineTheRock;
Wait(300+Random(200));
until(InvFull) or (FindNormalRandoms)
Drop;
end;
begin
ClearDeBug;
Writeln('Successfully compiled - Powered by JuKKa');
signature;
SetupSrl;
DeclarePlayers;
Q:= 2
repeat
repeat
FindNormalRandoms;
Mining;
CheckFight;
Q:= Q + 3;
until(Q = HowManyLoads)or(Not Loggedin);
CurrentPlayer:= CurrentPlayer + 1;
Logout;
LoginPlayer;
until(CurrentPlayer >= HowManyPlayers - 1);
end.
Line 16: [Error] (15345:1): Duplicate identifier 'x' in script C:\Documents and Settings\Compaq_Owner\Desktop\OreSmasherV0[1].2.scar
here is the script itself
program OreSmasher;
{ Post errors on the thread }
{ Declare players in lines 14-24 }
{ Set ore colour line 27 }
{ Must Set ore color or will get errors }
{credit to jukka, helped me with compiling & fixing some things}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
Const HowManyLoads = 99;// set how many loads to do
var
color : integer ;
x,y,Q, B : integer ; THIS IS WHERE THE ERROR IS, HELP PLEASE
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers)1;
CurrentPlayer := 1;
Players[0].Name :='sbgbs'; //Rs username
Players[0].Pass :='ssvsvr'; //Rs password
Players[0].Nick :='rngbs'; //Nickname ex heyidiot nickname would be yid
Players[0].Active := True;
Players[1].Name :='fghgfh';
Players[1].Pass :='gfhfh';
Players[1].Nick :='fghgfh';
Players[1].Active := True;
end;
procedure Signature;
begin
Writeln('OreSmasher');
Writeln('Created By Dangerous Garden Tools');
Writeln('Please Post All Errors On My Thread');
Writeln('So That I Can Improve The Script!');
Writeln('Enjoy');
end;
function OreColors: integer;
begin
result := 8829397; //color of the ore goes here
end;
procedure CheckFight;
begin
If(Not Loggedin)Then Exit;
if(FindFight)then
begin
RunAwayDirection('N');
wait(13000);
RunBack;
end;
end;
Function FindGass: Boolean;
begin
If(Not Loggedin)Then Exit;
if FindGas(x,y)then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
result:= true;
end;
end;
Procedure MineTheRock;
begin
If(Not Loggedin)Then Exit;
if FindColorTolerance(x,y,OreColors,MSX1,MSY1,MSX2,MS Y2,15)then
begin
FindNormalRandoms;
If(FindGass)Then Exit;
mouse(x,y,3,4,true)
sleep(6000)
CheckFight;
end;
end;
Procedure Drop;
var
B : integer;
begin
If(Not Loggedin)Then Exit;
FindNormalRandoms;
CheckFight;
B := 1;
repeat
MMouseItem(B);
If IsUpText('re')then
begin
DropItem(B);
end;
B := B + 1;
until(B > 27);
end;
Procedure Mining;
begin
If(Not Loggedin)Then Exit;
repeat
If(Not Loggedin)Then Exit;
MineTheRock;
Wait(300+Random(200));
until(InvFull) or (FindNormalRandoms)
Drop;
end;
begin
ClearDeBug;
Writeln('Successfully compiled - Powered by JuKKa');
signature;
SetupSrl;
DeclarePlayers;
Q:= 2
repeat
repeat
FindNormalRandoms;
Mining;
CheckFight;
Q:= Q + 3;
until(Q = HowManyLoads)or(Not Loggedin);
CurrentPlayer:= CurrentPlayer + 1;
Logout;
LoginPlayer;
until(CurrentPlayer >= HowManyPlayers - 1);
end.