Results 1 to 15 of 15

Thread: Blah Blah, DTMRotated Error

  1. #1
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Blah Blah, DTMRotated Error

    I know I'm doing at least one stupid thing...right...wrong. W/e
    Exception: Access violation at address 00723972 in module 'scar.exe'. Read of address 00000028 in line 20 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/DTM.scar
    From
    if(FindSymbol(x,y,'tree')) then
    wait(2000+random(500));
    if DTMRotated(Tree1, x, y, MMX1, MMY1, MMX2, MMY2) then
    Mouse(x,y,1,1,true);
    wait(3000+random(500));
    if DTMRotated(Tree2, x, y, MMX1, MMY1, MMX2, MMY2) then
    Mouse(x,y,1,1,true);
    wait(3000+random(500));
    DTMRotated(Altar, x, y, MSX1, MSY1, MSX2, MSY2);
    MMouse(x,y,1,1);
    Note: All things are declared as integers, all things are declared with 'DTMFromString' stuffs.
    Any ideas? It should be started around Tree1.
    Active only during the Summer...

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Are you sure you actually loaded the DTMs? If you put them into a different procedure you have to call that procedure also to load them into the memory.
    :-)

  3. #3
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, it's in the same procedure
    Active only during the Summer...

  4. #4
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Could you post the procedure?

  5. #5
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, sure =/
    SCAR Code:
    procedure BankToAltar;
    begin
      BankFE:= DTMFromString('78DA6354676060506000036608C5F0E6CD1B8' +
        '6FF409A1188FF0301A30C90A1C98002FEFC61624881AA01014605' +
        'FC6AC0588508351A44A8D125428D21613500C726182D');
      Tree  := DTMFromString('78DA63AC63626030636440060A1ADC0CFC401' +
           'A24FA1F0818416A7471AB0101C636A01A1B22D448E25703001D6B' +
           '0859');
      Tree1 := DTMFromString('78DA63CC65606098C6800224E55818E480342' +
           '310FF0702C63420A30C538D08540D0830360089E904D4F4028962' +
           '026A9A814425AA1A2F5D1EB87B400000E08F0AE0');
      Tree2 := DTMFromString('78DA634C6760604860400192722C0C72409A1' +
           '188FF030163119091835B0D083096018912026AEA8044240135D9' +
           '402204558D972E0F8A1A009D940A31');
      Altar := DTMFromString('78DA63F4656060D06340018696C60C1A409A1' +
           '188FF0301A30A90E187AAC6CEDD1EAE060418AB808403AA1A4B23' +
           '03543509402205558DB5AB2DAA1A17201184AA2630D29F410E490' +
           'D00DE9D0B78');
      MakeCompass('n');
      HighestAngle;
     DTMRotated(BankFE,x,y, MMX1, MMY1, MMX2, MMY2)
      Mouse(x,y,1,1,true);
      RadialRoadWalk(FindFallyRoadColor, 208, 200, 55, 0, 0);
      wait(1000+random(100));
      RadialRoadWalk(FindFallyRoadColor, 195, 180, 50, 0, 0);
      wait(2500+random(1000));
      RadialRoadWalk(FindFallyRoadColor, 213, 150, 58, 0, 0);
      wait(3000+random(500));                              
      if(FindSymbol(x,y,'tree')) then
        wait(2000+random(500));
        if DTMRotated(Tree1, x, y, MMX1, MMY1, MMX2, MMY2) then
          Mouse(x,y,1,1,true);
          wait(3000+random(500));
          if DTMRotated(Tree2, x, y, MMX1, MMY1, MMX2, MMY2) then
            Mouse(x,y,1,1,true);
            wait(3000+random(500));
            DTMRotated(Altar, x, y, MSX1, MSY1, MSX2, MSY2);
            MMouse(x,y,1,1);
            if isuptext('ysterious') then
              GetMousePos(x,y);
              Mouse(x,y,1,1,true);
              exit;
              if(not(DTMRotated(Tree, x, y, MMX1, MMY1, MMX2, MMY2))) then
                Writeln(Players[i].Name + ' is lost!');
                NextPlayer(True);
                exit;
                if(not(DTMRotated(Tree1, x, y, MMX1, MMY1, MMX2, MMY2))) then
                  Writeln('Our dear '+ Players[i].Name +' is lost!');
                  NextPlayer(True);
                  exit;
                  If(not(isuptext('ysterious'))) then
                    Writeln('Our dear '+Players[i].Name + ' has been abducted by aliens!');
    end;
    I just realized I made a really sad attempt at failsafes there...oh well, I'll fix that later.
    Active only during the Summer...

  6. #6
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    setupsrl?
    ~ Metagen

  7. #7
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's there in the main loop.

    ...
    Any ideas? Anyone? The man in the yellow hat? No, he has to be trick or treating..
    Michael Jackson? Wait, No, he's "busy" in his mansion.
    Oh well, maybe tomorrow.
    Active only during the Summer...

  8. #8
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    function FindDTMRotated(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; StartAngle, EndAngle, AngleStep: Extended; var Angle: Extended): Boolean;

    You forgot to add the last variables, it is different from FindDTM.

  9. #9
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    That's a whole different function. He's using DTMRotated in SRL.

  10. #10
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Crossheir the window maybe. when u go into dtm editor it will unselect the window.
    ~ Metagen

  11. #11
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    I dont thinks its about crosshair.

    Umm it didnt give me the error? or actually its exception but anyways..

  12. #12
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [offtopic]
    wow finally someone posted -.- i hate it when people dont post in the scripting help for like 40 minutes *yawn*
    [/offtopic]

    [ontopic]
    I guess ur scar or srl isnt updated fully (rawr)
    [/ontopic]
    ~ Metagen

  13. #13
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    lol its just an access violation...not a scar error...just restart scar so it can access everything correctly again...then it should work just fine

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  14. #14
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Sigh, Access violations come with dtm things etc -

    SCAR Code:
    program New;
    var
      x, y, i: Integer;
    begin
      FindDTM(i, x, y, 0, 0, 1, 1);
    end.

  15. #15
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -_- So all I had to do was reboot...
    Well, too bad Michael Jackson didn't come to my rescue, (thank god...) but at least Hyper and the man in the yellow hat did! (Oops, blue. Sorry n3ss3s.)
    Thanks.

    EDIT:
    Nvm, didn't work. Gave me the same error still, I'm going to try reinstalling SRL and SCAR.
    EDIT:
    Oh yes, this may have something to do with it. Since it's an if then if then over and over, it won't do anything unless you run it from the Falador bank I think.
    Active only during the Summer...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DTMRotated
    By Jackrawl in forum OSR Help
    Replies: 4
    Last Post: 12-20-2007, 11:35 PM
  2. DTMRotated Not Working.
    By chwiggy in forum News and General
    Replies: 3
    Last Post: 04-30-2007, 10:04 AM
  3. Blah Blah!!!
    By espionprime in forum Who Are You ? Who ? Who ?
    Replies: 0
    Last Post: 11-26-2006, 05:28 AM

Posting Permissions

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