frederick213
02-13-2007, 06:05 PM
I'm trying to use Jr's Draynor Yew Cutter but i keep coming out with this error
Line 714: [Error] (19020:10) : Duplicate identifier 'FINDROADCOLOR' in script
and this is where in the script it finds this error. If anyone could tell me how to fix it, that'd be awesome, thanks.
function FindRoadColor:integer; // By Tarajunky --- ALL CREDS TO HIM.
var red,green,blue:integer;
var TestColor,a,b,GenericRoadColor:integer;
begin
GenericRoadColor:=6842479;
Flag;
a:=MMX1;
b:=MMY1;
repeat
b:=b+1;
repeat;
a:=a+1;
if FindColorTolerance(x,y,GenericRoadColor,a,b,MMX2,M MY2,80) then
begin
a:=x;
b:=y;
TestColor:=GetColor(x,y);
red:=(TestColor mod 256);
green:=((TestColor/256) mod 256);
blue:=((TestColor/256) / 256);
if Red-Green>=5 then if Red-Green<=10 then
if Red-Blue>=5 then if Red-Blue<=10 then
begin
if GetColor(a+5,b+5)=TestColor then
if GetColor(a+3,b+3)=TestColor then
if GetColor(a,b+5)=TestColor then
if GetColor(a+5,b)=TestColor then
if GetColor(a,b+3)=TestColor then
if GetColor(a+3,b)=TestColor then
if GetColor(a+5,b+3)=TestColor then
if GetColor(a+3,b+5)=TestColor then
begin
result:=TestColor;
MyRoadColor:=TestColor;
Writeln('New RoadColor: '+IntToStr(TestColor));
exit;
end;
end;
end else a:=MMX2;
until a>=MMX2;
a:=MMX1;
until b>=MMY2;
Writeln('Could not find Road Color!');
result:=0;
end;
Line 714: [Error] (19020:10) : Duplicate identifier 'FINDROADCOLOR' in script
and this is where in the script it finds this error. If anyone could tell me how to fix it, that'd be awesome, thanks.
function FindRoadColor:integer; // By Tarajunky --- ALL CREDS TO HIM.
var red,green,blue:integer;
var TestColor,a,b,GenericRoadColor:integer;
begin
GenericRoadColor:=6842479;
Flag;
a:=MMX1;
b:=MMY1;
repeat
b:=b+1;
repeat;
a:=a+1;
if FindColorTolerance(x,y,GenericRoadColor,a,b,MMX2,M MY2,80) then
begin
a:=x;
b:=y;
TestColor:=GetColor(x,y);
red:=(TestColor mod 256);
green:=((TestColor/256) mod 256);
blue:=((TestColor/256) / 256);
if Red-Green>=5 then if Red-Green<=10 then
if Red-Blue>=5 then if Red-Blue<=10 then
begin
if GetColor(a+5,b+5)=TestColor then
if GetColor(a+3,b+3)=TestColor then
if GetColor(a,b+5)=TestColor then
if GetColor(a+5,b)=TestColor then
if GetColor(a,b+3)=TestColor then
if GetColor(a+3,b)=TestColor then
if GetColor(a+5,b+3)=TestColor then
if GetColor(a+3,b+5)=TestColor then
begin
result:=TestColor;
MyRoadColor:=TestColor;
Writeln('New RoadColor: '+IntToStr(TestColor));
exit;
end;
end;
end else a:=MMX2;
until a>=MMX2;
a:=MMX1;
until b>=MMY2;
Writeln('Could not find Road Color!');
result:=0;
end;