Results 1 to 3 of 3

Thread: DDTM problem

  1. #1
    Join Date
    Nov 2007
    Location
    Poland
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    DDTM problem

    I try to do DDTM walking procedure but when i run my script SCAR says:
    SCAR Code:
    [Runtime Error] : Exception: Access violation at address 006D87FE in module 'scar.exe'. Read of address 00000000 in line 43 in script C:\SCAR 3.15\Scripts\probaDDTM.scar
    here is script:
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    Var
      My1DTM,x, y: Integer;
      WhichAngle: Extended;

    Procedure SetMy1DDTM;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..2] of TDTMPointDef;
      My1DDTM: TDTM;
    begin
      dtmMainPoint.x := 27;
      dtmMainPoint.y := 5;
      dtmMainPoint.AreaSize := 1;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 6531265;
      dtmMainPoint.Tolerance := 255;

      dtmSubPoints[0].x := 12;
      dtmSubPoints[0].y := 11;
      dtmSubPoints[0].AreaSize := 1;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 1914478;
      dtmSubPoints[0].Tolerance := 30;

      dtmSubPoints[1].x := 28;
      dtmSubPoints[1].y := 31;
      dtmSubPoints[1].AreaSize := 1;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 2777408;
      dtmSubPoints[1].Tolerance := 30;

      My1DDTM.MainPoint := dtmMainPoint;
      My1DDTM.SubPoints := dtmSubPoints;
      My1DTM := AddDTM(My1DDTM);
    end;


    begin
    SetUpSRL;
    if FindDtmRotated(My1DTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi / 2, Pi / 2, 0.1, WhichAngle)then
    begin
    Mouse(x,y,1,1,True);
    end else writeLN('kpjpjp');
    TerminateScript;
    end.

    Plz Help.

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

    Default

    add 'SetMy1DDTM;' after 'SetUpSrl;' - your procedure should do it fine, but as you didn't run it before looking for the DTM, it doesn't like it
    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.

  3. #3
    Join Date
    Nov 2007
    Location
    Poland
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thnx. working xD.

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
  3. Help with DDTM
    By stampede10343 in forum OSR Help
    Replies: 3
    Last Post: 01-23-2008, 10:53 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
  •