Results 1 to 6 of 6

Thread: Access Violation

  1. #1
    Join Date
    Oct 2007
    Location
    Florida
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Access Violation

    Hi all, I've been working on my first script and I keep getting a constant error:

    Code:
    [Runtime Error] : Exception: Access violation at address 00531784 in module 'scar.exe'. Write of address 07BB1E24 in line 10 in script
    Here's my script:

    SCAR Code:
    program MuteIsleWalker;
    {.include SRL/SRL.scar}

    var
    xl,yl: Integer;
    logs, Attempts: Integer;

    Procedure FindTutGuide;
    begin
    If(FindColorSpiralTolerance(xl, yl, 5535856, xl - 20, yl - 20, xl + 20, yl + 20, 12))then
       Begin
          MMouse(xl, yl, 5, 5);
          Wait(100+Random(50));
          ClickMouse(xl,yl,true);
     end else
    FindTutGuide;
    end;

    Procedure CheckLogin;
    begin
    If (LoggedIn) then
    begin
    FindTutGuide;
    end else
    Wait(3000);
    CheckLogin;
    end;

    begin
     CheckLogin;
     FindTutGuide;
    end.

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try

    SCAR Code:
    begin
      SetupSRL;
     CheckLogin;
     FindTutGuide;
    end.

    Also you can just have..

    SCAR Code:
    begin
      SetupSRL;
      if(Not LoggedIn)then LoginPlayer;
      FindTutGuide;
    end.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Oct 2007
    Location
    Florida
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I gave it a try but, it gave me the same error.

    But I still didn't try the 2nd code you gave me because I think I need to set up a space to declare players to get LoginPlayer to work.

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry, yea declare players needed for that. Nvm that.

    SCAR Code:
    If(FindColorSpiralTolerance(xl, yl, 5535856, xl - 20, yl - 20, xl + 20, yl + 20, 12))then

    Thats your problem, xl and yl dont actually have any values. What are you trying to do here?

    If its finding on the main screen use..

    SCAR Code:
    If(FindColorSpiralTolerance(xl, yl, 5535856, MSX1, MSY1, MSX2, MSY2, 12))then

    If its near your character then..

    SCAR Code:
    If(FindColorSpiralTolerance(xl, yl, 5535856, MSCx-40, MSCy-40, MSCx+40, MSCy+40, 12))then

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  5. #5
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no... You are searching off the client's canvas.

    lx - 20 = -20 at most. You cant search negative pixels.

    Join the fastest growing merchanting clan on the the net!

  6. #6
    Join Date
    Oct 2007
    Location
    Florida
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, it works now. That was really starting to frustrate me..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Access violation...
    By mikevskater in forum OSR Help
    Replies: 3
    Last Post: 02-06-2008, 07:28 AM
  2. More Access Violation
    By Mute in forum OSR Help
    Replies: 2
    Last Post: 11-19-2007, 08:00 PM
  3. Access Violation?
    By ~alex~ in forum OSR Help
    Replies: 7
    Last Post: 03-31-2007, 05:47 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
  •