cycrosism
2009-03-27 05:07:19
Line 305: [Error] (16521:11): Unknown identifier 'RearrangeTPA' in script C:\Program Files\SCAR 3.20\includes\srl/srl/core/doorprofiles.scar
Just downloaded it and it has errors which means it must be outdated or something. I fixed the other error but i dont know how to fix this one. The lines are
Anyone help?
Just downloaded it and it has errors which means it must be outdated or something. I fixed the other error but i dont know how to fix this one. The lines are
function MdPtOfArray(var Slope: Extended; TheArray: array of TPoint): TPoint;
var
ArrayLength, minx, miny, maxx, maxy: Integer;
tmpTPA: array of TPoint;
begin
ArrayLength := getarraylength(TheArray);
setarraylength(tmpTPA, ArrayLength);
tmpTPA := TheArray;
if not (ArrayLength = 1) then
tmpTPA := RearrangeTPA(TheArray, 0, ArrayLength - 1, True, True); {This line gives me error}
minx := tmpTPA[0].x;
maxx := tmpTPA[ArrayLength - 1].x;
tmpTPA := TheArray;
if not (ArrayLength = 1) then
tmpTPA := RearrangeTPA(TheArray, 0, ArrayLength - 1, False, True);
miny := tmpTPA[0].y;
maxy := tmpTPA[ArrayLength - 1].y;
if ArrayLength = 1 then
begin
Result := TheArray[0];
Slope := 1;
exit;
end;
Result.x := Round((maxx + minx) / 2)
Result.y := Round((maxy + miny) / 2)
if (maxx - minx) = 0 then
begin
slope := 150.0;
exit;
end;
if (maxy - miny) = 0 then
begin
slope := 0.0;
exit;
end;
Slope := ((maxy - miny) / (maxx - minx));
end; Anyone help?