Results 1 to 5 of 5

Thread: Runtime error

  1. #1
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Runtime error

    ok, so here it is. i've never had this problem before..
    Code:
    [Runtime Error] : Exception: Access violation at address 006F5B99 in module 'scar.exe'. Read of address 00000034 in line 314 in script C:\Program Files\SCAR 3.05\includes\srl\srl\core\Text.scar
    and here is line 314 in Text.scar
    Code:
    if (FindBitmapMaskTolerance(CWindow, x, y, 400, 3, 515, 100, 0, 85)) then
    i DID call SetupSRL!

  2. #2
    Join Date
    May 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm not sure what the problem is but what i get is a message saying "runtime error" and it closes it...post the script on here plz
    you attempt to light a fire, you light the fire, you place the raw shrimp on the fire, you accidentally burn the shrimp. DAMMIT!

    Evil Walrus's will control the world someday...

  3. #3
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, here's the script. its literally nothing so far...
    Code:
    program WillowChopper;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\Skill\Woodcutting.scar}
    {.include SRL\SRL\Extended\xDTM.scar}
    {.include SRL\SRL\Extended\xAntiBan.scar}
    
    var
    Ent:boolean;
    ChopMark, DoDebug:integer;
    
    const
    WillowColor1=5535856;//The first willow color.
    WillowColor2=3561552;//The second willow color.
    WillowColor3=4489328;//The third willow color.
    WaitTime=7;//time IN SECONDS that you want to wait before cutting another willow
    
    
    Procedure DeclarePlayers;
    Begin
    
         HowManyPlayers := 1;//How many players are you running?
         CurrentPlayer:= 0; // Which player you want to start with.
         NumberOfPlayers(HowManyPlayers);
    
       Players[0].Name  := 'doomessenger';//Username of the player
       Players[0].Pass  := '';            //Password of the player
       Players[0].Nick  := 'mes';    //3 Lowercase Letters of your username
       Players[0].Integer1:= 25;    //Loads For Player
       Players[0].Boolean1:= False; //Equip Axe?
       Players[0].Active := True;   //Is the player active?
    end;
    
    Function InBank:Boolean;
    begin
     Result:=  FindColorSpiralTolerance(x,y,8091511,5,5,512,334,5)
    end;
    
    procedure DoomDebug(S:String);
    begin
     Case DoDebug Of
      1:DisguiseScar(S);
      2:Writeln(S);
      3:Status(S);
      4: Begin
         DisguiseScar(S);
         Writeln(S);
         Status(S);
         end;
     end;
    end;
    
    procedure WalkToTrees;
    begin
    
    Mouse(626,126,4,4,true);
    Flag;
    end;
    
    Function GetUpTextYellow:String;
    Begin
      Result := Trim(GetTextAtEx(7, 7, 140, upchars, true,
      true, 0, 2, 1305063, 50, True, tr_AllChars));
    End;
    
    Function IsUpTextYellow(Text: String): Boolean;
    
    Begin
      Result := (Pos(Text, GetUpTextYellow) <> 0)
    End;
    
    Function CheckEnt(WhichTreeType:String):Boolean;
    //results true if an ent is found.
     begin
       Case WhichTreeType Of
       'willow' : begin
        if(IsUpTextYellow(Capitalize(WhichTreeType)))then
        begin
        Result:=true;
        Ent:=true;
        end;
        if(not(IsUpTextYellow(Capitalize(WhichTreeType))))then
        begin
        Result:=false;
        Ent:=false;
        end;
        end;
      end;
    end;
    
    Function CharmFindObject(var cx, cy: Integer; color1, color2, color3, tolerance: Integer): Boolean;
    Var
      x, y, a, c, i, x1, y1, x2, y2 : Integer;
    Begin
      If FindColorSpiralTolerance(x, y, Color1, MSX1, MSY1, MSX2, MSY2, Tolerance) or FindColorSpiralTolerance(x, y, Color2, MSX1, MSY1, MSX2, MSY2, Tolerance) or FindColorSpiralTolerance(x, y, Color3, MSX1, MSY1, MSX2, MSY2, Tolerance) Then
     Begin
        x1 := 245;
        y1 := 165;
        x2 := 277;
        y2 := 185;
        Repeat
          If (not (Loggedin)) Then
            break;
          a := a + 1;
          If (a = 1) Then
            c := c + 1;
          If (a = 3) Then
            c := c + 1;
          for i := 1 to c do
          Begin
            If (a = 1) Then
            Begin
              x1 := x1 + 30;
              x2 := x2 + 30;
            End;
            If (a = 2) Then
            Begin
              y1 := y1 - 20;
              y2 := y2 - 20;
            End;
            If (a = 3) Then
            Begin
              x1 := x1 - 30;
              x2 := x2 - 30;
            End;
            If (a = 4) Then
            Begin
              y1 := y1 + 20;
              y2 := y2 + 20;
            End;
            If (x1 = 485) and (x2 = 517) Then
              x2 := x2 - 2;
            If (y1 = 325) and (y2 = 345) Then
              y2 := y2 - 7;
            If (x2 > 515) Then
              Break;
            If (FindColorTolerance(x, y, color1, x1, y1, x2, y2, tolerance)) or
               (FindColorTolerance(x, y, color2, x1, y1, x2, y2, tolerance)) or
               (FindColorTolerance(x, y, color3, x1, y1, x2, y2, tolerance)) then
                Begin
                  MMouse(x, y, 5, 5);
                  GetMousePos(x, y);
                  cx:= x;
                  cy:= y;
                  If (IsUpTextMulti('illow', 'low', 'own Will')) Then
                    Begin
                     If NOT(CheckEnt('Willow'))then
                      Begin
                       Mouse(MMCX, MMCY, 5, 5, True);
                       Wait(2000+Random(5000));
                       FindNormalRandoms;
                       EntsAvoided:= EntsAvoided + 1;
                       Break;
                       Result:= False;
                      End else
                      Begin
                      Result := True;
                      Break;
                     End
                    End;
                End;
          End;
          If (a = 4) Then
            a := 0;
        Until (x2 > 515) or (Result = True);
      End;
    End;
    
    
    Function ChopWillow:Boolean;
    begin
        If(Random(20) <=10)then
         FindAxeHeadColor;
      If(CharmFindObject(x,y,WillowColor1,WillowColor2,WillowColor3,15))then
    
       Begin
        Result:= True;
        If(not(CheckEnt('Willow')))then
          Begin
           Status('Chopping');
           If(Random(20) <= 10)then
             Begin
               Mouse(X, Y, 2, 2, True);
             End
            Else
             Begin
               Mouse(X, Y, 2, 3, False);
               ChooseOption(x, y, 'hop down');
             End
          End
    
        If(FlagPresent)then
         Begin
          Flag;
         End
    
       Wait(200-Random(50));
       DoomDebug('CheckAxe');
       FindAxeHeadColor;
    
    
       MarkTime(ChopMark);
    
       Repeat
        If(not(LoggedIn))then Break;
    
         DoomDebug('FindRandoms');
         FindNormalRandoms;
         If(InvFull)then Break;
    
    
    until(TimeFromMark(ChopMark) >= (WaitTime*1000+Random(1000)))
    end;
    end;
    
    
    
    
    procedure ChopAndBankLoop;
    begin
       //repeat
       //if not LoggedIn or WeAreDead then break
       If InBank Then
       begin
       MakeCompass('N');
       WalkToTrees;
    
       repeat
        ChopWillow;
       until(InvFull);
    end;
    end;
    
    begin
    SetupSRL;
    DeclarePlayers;
    ActivateClient;
    GameTab(4);
    ChopAndBankLoop;
    end.

  4. #4
    Join Date
    Oct 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if you don't mind my asking, what scar/srl are you using? i have gotten runtime errors when trying to run older scripts on divi maybe just download 2.03 with an earlier srl.(i swear i have seen most of that script somewhere before)

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i have scar 3.05, and im using the SRL that Divi downloads, which i believe is a modified 3.7.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Runtime Error] : Exception: buffer error
    By GasMan in forum OSR Help
    Replies: 11
    Last Post: 05-13-2007, 02:07 PM
  2. Runtime Error
    By CamHart in forum OSR Help
    Replies: 2
    Last Post: 11-23-2006, 05:21 AM
  3. Runtime error
    By sk8ter in forum OSR Help
    Replies: 3
    Last Post: 10-30-2006, 01:55 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
  •