Results 1 to 8 of 8

Thread: [Runtime Error] : Exception: Access violation at address 00722546

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default [Runtime Error] : Exception: Access violation at address 00722546

    i get that error when i try and run this script

    Code:
    program J_P2k8Willows;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include Srl/Srl.scar}
    {.include Srl/Srl/Skill/Woodcutting.scar}
    {.include Srl/Srl/Misc/Trade.scar}
    
    
    
    const
      YourSRLId = ''; //Your SRL ID.
      YourSRLPassword = ''; //Your SRL Password.
      Version = '0.1'; // Don't touch! :)
      World = 127; //World that SMART enters .
      Signed = True; //Client signed=True or unsigned=False .
      MinutesTerminate = 360; //Minutes to work(It will terminate script after those minutes)
      pin = ' ';
    
      var lvlups,loads,axedtm,brokenaxedtm,willowdtm,x,y,loads2:integer;
      
      
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; // If you add more players , make sure you set this correct, ;)
      NumberOfPlayers(HowManyPlayers);
    
      Players[0].Name := ''; //Your username between ''
      Players[0].Pass := '; //Your password between ''
      Players[0].Nick := ''; //Nickname from you username between ''
      Players[0].Active := True; //Active->True or False.
      Players[0].Integers[0] := 10; //Loads to do.  Random 3 will be added.
      Players[0].Strings[1] := 'FEB'; //Place where you want to cut, VEB or FEB.
    end;
    
    procedure LoadDTMs;
    begin
    
    
      AxeDTM := DTMFromString('78DA63FCCFC4C0B09F91011974670832FC07D' +
        '220D1FF40C0F80BA8E61CAA1A882C8C04D1CC0C0C5B08A8E101AA' +
        'D949400D1750CD3EFC6A0056B70BE7');
    
      BrokenAxeDTM := DTMFromString('78DA63B4626660B8C2C8800C3AD20419FE036' +
        '990E87F2060B405AA3981AA06220B2381B40750CD29026ACC806A' +
        '1E1150E30A547396801A37A09A4BF8D5000072D20C8B');
    
    
      WillowDTM := DTMFromString('78DA6364C00D1861342790E0429573B195445' +
        '5230D24D809A891071212A86A8CF58451D5F00009595435C5D94EA86' +
        'A5830CD498EB64055C30A240451D578384891EC2F00DA4D05E5');
    
    end;
    
    procedure antibanz;
    begin
      If(not LoggedIn)then Exit;
      Case Random(9) of
        0:  MMouse(Random(MSX2),Random(MSY2),0,0);
        1:  PickupMouse;
        2:  SleepAndMoveMouse(400+Random(1500));
        3:  if Random(2) = 1 then MMouse(1, 338, 515, 165);
        4:  if Random(2) = 1 then MMouse(515, 1, 250, 503);
        5:  RandomMovement;
     6..9:
    begin
      case Random(3) of
       0: begin
            KeyDown(VK_RIGHT);
            Wait(500+Random(2000));
            KeyUp(VK_RIGHT);
        end;
       1: begin
            KeyDown(VK_Left);
            Wait(500+Random(2000));
            KeyUp(VK_Left);
          end;
       2: begin
            case Random(2) of
              0: begin
                   KeyDown(VK_RIGHT);
                   Wait(500+Random(1400));
                   KeyUp(VK_RIGHT);
                 end;
              1: begin
                   KeyDown(VK_Left);
                   Wait(500+Random(1400));
                   KeyUp(VK_Left);
                end;
              end;
            end;
          end;
        end;
      end;
    end;
    
    Procedure WalkToWillow;
    var rockdtm:integer;
    begin
      makecompass('n')
      RockDTM := DTMFromString('78DA639CC5C4C090C8800212B263190481342' +
           '310FF070246909A385435DEA15E609A11CA679C0354138B690E8A' +
           '9A794035F1A86A9C7CEC30D52413503313A82695809AE998E618D' +
           'B1AA0AA9986DDEF18E6C4E35703002E21158F');
     If (not(loggedin)) then exit;
      if DTMRotated(Rockdtm, x, y, MMX1, MMY1, MMX2, MMY2) then
     begin
        DTMRotated(Rockdtm, x, y, MMX1, MMY1, MMX2, MMY2)
        Mouse(X-5+random(3),Y+5+random(3), 0, 0, True);
     end else
     begin
       symbolAccuracy := 0.4;
       if(FindSymbol(x, y, 'bank')) then
        begin
           mouse(x-30,y+30,6,6,true);
           FFlag(10);
        end else
       begin
        Writeln('Could not find willows');
        wait(700);
        writeln('Looking for water color');
        RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
        if (not(RadialWalk(FindWaterColor, 180, 270, 60, -1, 0))) then
        begin
         If(FindSymbol(x,y, 'Bank')) then
         begin
           Mouse(x,y,7,7,true);
           FFlag(10);
          end else
            if (FindSymbol(x, y, 'fishing spot')) then
            begin
               Mouse(x,y,7,7,true);
               FFlag(10);
            end else
            begin
              ClearDebug;
     //         DeathWalk;
     freedtm(rockdtm);
            end;
        end;
      end;
    end;
    end;
    
    procedure findrandoms;
    begin
      findnormalrandoms;
    end;
    
    
    procedure Sig;
    begin
      ClearDebug;
      Wait(80);
      Writeln(' _   _    ');
      Wait(80);
      Writeln('     J   _   P   ');
      Wait(80);
      Writeln('            2               ');
      Wait(80);
      Writeln('                 K          ');
      Wait(80);
      Writeln('                      8     ');
      Wait(80);
      Wait(4000);
      ClearDebug;
    end;
    
    
    
    {<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
    ||              AreWeLevelUp - Checks for lvlup and clicks         ||
    ||                              By: PvH                            ||
    <+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>}
    
    function AreWeLevelUp: boolean;
    begin
      if not LoggedIn then Exit;
      if ClickContinue(True, False) then
      begin
        if FindNPCChatText('lations', Nothing) then
        begin
          Writeln('Yay, we got a new level!');
          Lvlups := Lvlups + 1;
          Inc(ReportVars[3]);
          ClickContinue(True, True);
          Result := True;
          Exit;
        end;
      end;
    end;
    
    procedure ChopLogs;
    var
        i,x,y,m: integer;
        treecolors: array [0..3] of integer;
        treeNames: array [0..2] of String;
    
    begin
      disguise('chopping')
      treecolors[0]:= 3759203;
      treecolors[1]:= 5406322;
      treecolors[2]:= 6132352;
      treecolors[3]:= 3363673;
      treenames[0]:= 'Wil';
      treenames[1]:= 'llo';
      treenames[2]:= 'low';
      repeat
        if (not LoggedIn) then Exit;
          for i := 0 to 3 do
            if FindObjTPA(x, y, treecolors[i], 10, 2, 15, 25, 10, [treenames[0], treenames[1], treenames[2]]) then
            begin
              FindObjTPA(x, y, treecolors[i], 10, 2, 15, 25, 10, [treenames[0], treenames[1], treenames[2]])
              Wait(100 + Random(300));
                 begin
                      Mouse(x, y, 4, 4, True);
                      m:=0;
                      MarkTime(M);
                      while (TimeFromMark(M) < 10000 + random(3000)) do
                      Case (Random(2)) of
                      0: findrandoms;
                      1: antibanz
                      end;
                     end;
                 end;
              AntiBanz;
              FindRandoms;
              if not (LoggedIn) then
                  begin
                    NextPlayer(False);
                    LoginPlayer;
                 end;
              until invfull
             end;
    
    Procedure treesTobank;
    var bankers:integer;
    begin
    disguise('banking')
    Bankers := DTMFromString('78DA632C666260706740015FBF32300802694' +
           '620FE0F048C20355E0C6880118904D2E540353E44A8F14055F1EF' +
           '9F20AA1A905D6E04D41462BA19AB1A4F02EEA900AAF126420D9A3' +
           '977EF32A0A80100852514A9');
        if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
        Mouse(X-5+random(3),Y+5+random(3), 0, 0, True);
        Flag;
        freedtm(bankers);
    end;
    
    
    
    Procedure Banking;
    Begin
      disguise('banking')
      MakeCompass('N');
      Wait(300 + random(160));
      OpenBankQuiet('db');
      If (PinScreen) Then
        InPin('Pin');
      If Players[currentplayer].Booleans[0] = True Then
      Begin
        Deposit(1, 28, True);
      End;
      If Players[currentplayer].Booleans[0] = False Then
      Begin
        Deposit(2, 28, True);
      End;
      Mouse(RandomRange(483, 495), RandomRange(29, 41), 0, 0, True);
      Wait(150 + random(278));
      loads2:= loads2+28;
    End;
    
    
    
    procedure ProgressReport;
    var
      i: Integer;
    begin
      disguise('proggy')
      SrlRandomsReport;
      SendSRLReport;
      Writeln('');
      Writeln('|~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~| ');
      Writeln('|~|                                               | ');
      Writeln('|~|     J_P 2k8 v' + Version +                '   | ');
      Writeln('|~|     Worked: ' + TimeRunning  +            '   | ');
      Writeln('|~|     Banked: ' + IntToStr(Loads2) + ' loads.   | ');
      writeln('|~|                                               | ');
      Writeln('|~|                                               | ');
      Writeln('|~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~| ');
      Writeln('|~|                                               | ');
      Writeln('|~|     Thanks for using!                           ');
      Writeln('|~|     Please post the proggy at villavu.com    ');
      Writeln('|~|                                               | ');
      Writeln('|~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~| ');
    end;
    
    
    procedure SwitchPlayers;
    begin
      if LoggedIn then Exit;
      if Loads > Players[CurrentPlayer].Integers[0] + Random(3) then
      begin
     //   Result := True;
        WriteLn('Loads done.');
        Players[CurrentPlayer].Rand := 'Waiting for another turn .';
        Loads := 0;
      end;
    end;
    
    {procedure checkforaxe;
    begin
      GameTab(4);
      If finddtm(axedtm,x,y,MMX1, MMY1, MMX2, MMY2) then
      begin
        WalkToWillow;
      end else;
        GameTab(5);
        If finddtm(axedtm,x,y,MMX1, MMY1, MMX2, MMY2) then
      begin
        WalkToWillow;
      end else;
          logout;
          NextPlayer(False);
          switchplayers;
        end;
               }
    
    procedure PlayerSetup;
    begin
      GraphicsSet := true;
      LoginPlayer;
      //URun;
      //Checkforaxe;
     // First := True;
     // if LoggedIn then
     // begin
    end;
    
    begin
      SmartSetupEx(World, False, Signed, False);
      SetTargetDC(SmartGetDC);
      activateclient;
      SRLId := YourSRLId;
      SRLPassword := YourSRLPassword;
      SetupSRL;
      ScriptID := '';
      DeclarePlayers;
      Sig;
      repeat
        PlayerSetup;
        repeat
          ProgressReport;
          begin
            walktowillow;
            choplogs;
            treestobank;
            banking;
            {if (TimeFromMark(minutesterminate) > 1000 * 60 * MinutesTerminate) then
            begin
              logout;
              TerminateScript;
            end;}
          end;
        until (not LoggedIn);
        ProgressReport;
        Nextplayer(Players[CurrentPlayer].Active);
        until (loads2 = Players[currentplayer].Integers[0]);
    end.
    and i dont know what it is at all

    help??????????
    Last edited by JPHamlett; 04-30-2009 at 11:00 AM.

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Umm...run or compile? It compiles just fine, you have an extra variable in your proggy sub. Don't need it. This is what I got when compiled :
    SCAR Code:
    Successfully compiled (5053 ms)
    Line 275: [Hint] (17756:1): Variable 'I' never used in script

    Try updating?

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Camo¤Kyle View Post
    Umm...run or compile? It compiles just fine, you have an extra variable in your proggy sub. Don't need it. This is what I got when compiled :
    SCAR Code:
    Successfully compiled (5053 ms)
    Line 275: [Hint] (17756:1): Variable 'I' never used in script

    Try updating?

    ~Camo
    when u run it and when it checks for the aex i get the error

  4. #4
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Mate i'm afraid you left your username and password in the script, fortunately I have changed it and sent a P.M. to you.

    Stay safe mate, happy scripting.

    -All that is man

  5. #5
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your looking for the axe in the minimap..

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

    Default

    You also never call LoadDTMs to actually store your DTMs in variables. I'm guessing that this is your problem, despite you not posting the full error (which is necessary to determine the exact cause).
    :-)

  7. #7
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Method View Post
    You also never call LoadDTMs to actually store your DTMs in variables. I'm guessing that this is your problem, despite you not posting the full error (which is necessary to determine the exact cause).
    I'm pretty sure he did post the full error. Runtime Errors don't usually tell you where they went wrong in the script.

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

    Default

    Quote Originally Posted by senrath View Post
    I'm pretty sure he did post the full error. Runtime Errors don't usually tell you where they went wrong in the script.
    Now that you mention it, that may be the case, but usually errors with DTM finding give you an error to the effect of "read of address blah..." with a line number, which seems to be where the problem is stemming from considering he mentions he happens when he tries to find the axe (call checkforaxe).
    :-)

Thread Information

Users Browsing this Thread

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

Posting Permissions

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