weequ
2010-04-08 07:06:08
Solved.
2010-04-08 07:06:08
2010-04-08 07:15:43
2010-04-08 07:21:33
From: Naum
You need to set the length of T2D, I think.
Would you mind showing the whole script? Could be a problem with the array NoFindBoxes aswell.
2010-04-08 11:05:52
2010-04-08 12:00:26
From: IceFire908
Might be because you mess with the Length of T2D in the middle of a loop (shortening it) and then when it goes to the next step in the loop its out of range because the high is smaller. " SetArrayLength(T2D, L2-1);" <-> "for II := 0 to High(T2D) do"
2010-04-08 13:55:53
From: antti mies
But as you can see I have that WriteLn('a'); in that function and it only prints it once so it can't have gone that far in the script :(
Edit: You can only see in the whole script :P
for II := 0 to High(T2D[I]) do
for III := 0 to High(NoFindBoxes) do
if PointInBox(T2D[I][II], NoFindBoxes[III]) then
begin
L := High(T2D[I]);
Swap(T2D[I][II], T2D[I][L]);
L2 := Length(T2D[I])
SetArrayLength(T2D[I], L2-1);
end;
2010-04-09 01:36:59
2010-04-10 09:47:39
for II := 0 to High(T2D[I]) do
for III := 0 to High(NoFindBoxes) do
if PointInBox(T2D[I][II], NoFindBoxes[III]) then
begin
L := High(T2D[I]);
Swap(T2D[I][II], T2D[I][L]);
L2 := Length(T2D[I])
SetArrayLength(T2D[I], L2-1);
Break; // <---- HERE
end;