SRL Archive - OSR Help

Identifier expected please help


Daniel279

2013-03-26 16:04:45

function KillChicken: Boolean;
var
RTPA: TPointArray;
i: Integer;
ATPA: T2DPointArray;
T2DExtendedArray:
begin
SetColortolerancespeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, RTPA, 5095895, MSX1, msy1, msx2, msy2, 5)
Setcolortolerancespeed(0);
RAaSTPAEx(RTPA,3,3);
if Length(RTPA) = 0 then
writeln('Didn''t find chick colors.');
SplitTPAExWrap(RTPA, 15, 15, ATPA);
if (Length(ATPA) > 0) then
SortATPAFrom(ATPA, Point(MSCX, MSCY))
else
Exit;

when trying to run this script it says "Identifier expected at line 26
Compiling failed."
line 26 is where it says 'begin' any help is greatly appreciated
sorry f i posted this in the wrong place im new to simba

rj

2013-03-26 16:07:02

add a End; at the end

Daniel279

2013-03-26 16:17:39

there is an end. at the end of the script this is just a segment showing whats wrong

rj

2013-03-26 16:20:47

Oh I see

T2DExtendedArray:


that is a type of variable, you never declared a variable there


function KillChicken: Boolean;
var
RTPA: TPointArray;
i: Integer;
ATPA: T2DPointArray;
//T2DExtendedArray:
begin
SetColortolerancespeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, RTPA, 5095895, MSX1, msy1, msx2, msy2, 5) Setcolortolerancespeed(0);
RAaSTPAEx(RTPA, 3, 3);
if Length(RTPA) = 0 then
writeln('Did not find chicken colors.');
SplitTPAExWrap(RTPA, 15, 15, ATPA);
if (Length(ATPA) > 0) then
SortATPAFrom(ATPA, Point(MSCX, MSCY))
else
Exit;
End;

For every begin you need an end;