Results 1 to 1 of 1

Thread: Out of range error.

  1. #1
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Out of range error.

    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.
    Last edited by ReadySteadyGo; 01-20-2012 at 12:37 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •