Hi I am getting an out of range error message when running this. However, due to being in the main thread, it doesn't reference the point where I am getting the error.
full script: http://pastebin.com/6Y4Hk3BU
cube.obj: http://pastebin.com/rnFimDXB
I have narrowed it down to these lines:
Simba Code:for i := 0 to High(Cube.Faces) do
for j := 0 to 2 do
begin
fp1 := j;
fp2 := (j+1) mod 3;
Writeln('blah');
case fp1 of
0: p1 := Point(CubePoints[Cube.Faces[i].a].x, CubePoints[Cube.Faces[i].a].y);
1: p1 := Point(CubePoints[Cube.Faces[i].b].x, CubePoints[Cube.Faces[i].b].y);
2: p1 := Point(CubePoints[Cube.Faces[i].c].x, CubePoints[Cube.Faces[i].c].y);
end;
case fp2 of
0: p2 := Point(CubePoints[Cube.Faces[i].a].x, CubePoints[Cube.Faces[i].a].y);
1: p2 := Point(CubePoints[Cube.Faces[i].b].x, CubePoints[Cube.Faces[i].b].y);
2: p2 := Point(CubePoints[Cube.Faces[i].c].x, CubePoints[Cube.Faces[i].c].y);
end;
DrawLine(tbmp.Canvas, p1, p2);
end;
EDIT: Never mind, solved.







Reply With Quote