Results 1 to 4 of 4

Thread: DDTM Error I think....

  1. #1
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DDTM Error I think....

    I get a type mismatch in this line:

    SCAR Code:
    if DTMRotated(EdgeVille1DDTM, x, y, MMX1, MMY1, MMX2, MMY2) then

    edgeville1DDTM is declared as a TDTM.

    help please.

  2. #2
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Do this:

    Make a new thing with all your DDTM's in it:

    Example:
    SCAR Code:
    function LoadAllDDTMWalks(WalkNumber: Integer): Integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: array[0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      case WalkNumber of
        0: begin //Walk To Yews Begins
            dtmMainPoint.x := 628;
            dtmMainPoint.y := 39;
            dtmMainPoint.AreaSize := 2;
            dtmMainPoint.AreaShape := 0;
            dtmMainPoint.Color := FindGERoadColourBH;
            dtmMainPoint.Tolerance := 0;

            dtmSubPoints[0].x := 611;
            dtmSubPoints[0].y := 32;
            dtmSubPoints[0].AreaSize := 1;
            dtmSubPoints[0].AreaShape := 0;
            dtmSubPoints[0].Color := FindGERoadColourBH;
            dtmSubPoints[0].Tolerance := 0;

            dtmSubPoints[1].x := 646;
            dtmSubPoints[1].y := 28;
            dtmSubPoints[1].AreaSize := 1;
            dtmSubPoints[1].AreaShape := 0;
            dtmSubPoints[1].Color := FindGERoadColourBH;
            dtmSubPoints[1].Tolerance := 0;

            dtmSubPoints[2].x := 605;
            dtmSubPoints[2].y := 35;
            dtmSubPoints[2].AreaSize := 1;
            dtmSubPoints[2].AreaShape := 0;
            dtmSubPoints[2].Color := FindGERoadColourBH;
            dtmSubPoints[2].Tolerance := 0;

            dtmSubPoints[3].x := 644;
            dtmSubPoints[3].y := 33;
            dtmSubPoints[3].AreaSize := 1;
            dtmSubPoints[3].AreaShape := 0;
            dtmSubPoints[3].Color := FindGERoadColourBH;
            dtmSubPoints[3].Tolerance := 0;

            dtmSubPoints[4].x := 628;
            dtmSubPoints[4].y := 50;
            dtmSubPoints[4].AreaSize := 1;
            dtmSubPoints[4].AreaShape := 0;
            dtmSubPoints[4].Color := FindGERoadColourBH;
            dtmSubPoints[4].Tolerance := 0;

            TempTDTM.MainPoint := dtmMainPoint;
            TempTDTM.SubPoints := dtmSubPoints;
            Result := AddDTM(TempTDTM);
          end;
    end;

    Now for your thing do this:

    SCAR Code:
    var
      Walk: integer;
    Walk := LoadAllDDTMWalks(0);
    if DTMRotated(Walk, x, y, MMX1, MMY1, MMX2, MMY2) then

    Then just free the DTM after your done, its really fast and preety good.

    Look at:
    http://www.villavu.com/forum/showthread.php?t=27243

    If you wanna see how my proc is.

  3. #3
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    If you don't want to do that, then your DDTM should end up being assigned to a regular DTM and not a TDTM. You should have something like this:
    SCAR Code:
    DDTMSkeleton.MainPoint := MainPoint;
      DDTMSkeleton.SubPoints := SubPoints;
      DTM:= AddDTM(DDTMSkeleton);
    with DTM, DDTMSkeleton, MainPoint and SubPoints replaced with the appropriate.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  4. #4
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks, i think im going to use Bobbo's thing.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If there is a DDTM....
    By Claymore in forum OSR Help
    Replies: 6
    Last Post: 07-07-2008, 03:43 AM
  2. DDTM help
    By [S]paz in forum OSR Help
    Replies: 12
    Last Post: 02-16-2008, 06:18 PM

Posting Permissions

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