Results 1 to 3 of 3

Thread: Access violation error

  1. #1
    Join Date
    Apr 2007
    Location
    Laguna Beach, California
    Posts
    231
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Access violation error

    Hey everyone when i try to do this:

    SCAR Code:
    function WalkToMaples : boolean;
    begin
      Tree[3].DTMs[0] := AssembleMaple;

      if (DTMRotated(Tree[3].DTMs[0], x, y, MMX1, MMY1, MMX2, MMY2)) then
        begin
          WriteLn('Found Maples!');
          Mouse(x, y - random(10), 2, 2, true);
          Wait(3000+random(1000));
          Flag;
          Result := true;
        end else //Theres more down here. But this is all thats relevant to the error.

    I get an access violation:

    Code:
    [Runtime Error] : Exception: Access violation at address 004B998D in module 'scar.exe'. Read of address 0B640054 in line 81 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Color.scar
    Which is:

    SCAR Code:
    if (FindDTMRotated(DTM, x, y, x1, y1, x2, y2, 0 - t, 0 + t, s, AngleFound)) then
    in color.scar

    Does anyone know why this would happen? It only happens about once every 20 times and i think it has to do w/ the mm rotation.

    Thanks
    PS if you need more of the script let me know

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Did you load your DTM's in the MainLoop?

  3. #3
    Join Date
    Apr 2007
    Location
    Laguna Beach, California
    Posts
    231
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea the assembleMaple function returns the dtm so it loads every time i run that function

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Runtime error - Access violation
    By Rich in forum OSR Help
    Replies: 6
    Last Post: 08-29-2008, 08:19 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
  •