Results 1 to 2 of 2

Thread: please help me with an ERROR i got

  1. #1
    Join Date
    Oct 2006
    Posts
    87
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default please help me with an ERROR i got

    kk heres my script

    SCAR Code:
    program WoodCutter;
    {.include SRL\SRL.Scar}
    {.include SRL\SRL\Extended\xAntiBan.scar}
    {.include SRL\SRL\Extended\xAntiRandoms.scar}
    {.include SRL\SRL\Skill\Woodcutting.SCAR}

    var
      o, p: integer;
      Clicks: Integer;
      Loads: Integer;
      BrokenAxeDTM, RegularAxeDTM : Integer;
      TheTreeName : String;
      TreeColor   : Integer;

    const
      TreeColors = 2904136;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '******';
      Players[0].Pass := '******';
      Players[0].Nick := '******'; //3 - 4 letters of YOUR username, example: sern
      Players[0].Active := True;
    end;

    Procedure GetAxeColors;     // taken from fours script
    Begin
    Wait(100)
    MakeCompass('S');
    GameTab(4)
    FindAxeHeadColor;
    MakeCompass('N')
    end;

    Var
      EX, EY : integer;              // taken from fours script
      FX, FY : integer;
    Procedure EntChecker;
    Begin
      Status('Checking For Ent')            // taken from fours script
      Flag;
      If (FindObjMultiText(EX, EY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
      Begin
        MMouse(Ex, EY, 0, 0)
          If FindColorTolerance( FX, FY, 55769, 85, 15, 115, 15, 20) then
          Begin
            Status('Ent Found');
            MouseFindFlag(648,83,5,5);                // taken from fours script
            Wait(15000+Random(5000));
            EntsAvoided := EntsAvoided + 1
          end;
       end;
    end;

    Var
      BX, BY, NX, NY : integer;

    Procedure IsAxeBroken;               // taken from fours script
    Begin
      Status('Checking for broken axe')
      GameTab(4)
      Wait(400 + Random (100))
      If (Not(FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 ))) then
      Begin
        Status('Axe Not Broken')         // taken from fours script
        Exit;
      end;
      Begin
        If (FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 )) and
           (Not(FindDTM(RegularAxeDTM, NX, NY, MIX1, MIY1, MIX2, MIY2))) then
        Begin
          Status('Broke an Axe, and you have no more.')
          NextPlayer(False)
          end;                          // taken from fours script
       end;
    end;

    Procedure TheFindAxe;
    Begin                          // taken from fours script
    Status ('Looking For Axe')
    FindHead;
    end;                           // taken from fours script

    procedure AntiBanning;
    begin
      RotateEvery(20 + Random(10));
      LeaveScreenEvery(5 + Random(5));
      HoverEvery(15 + Random(5), 'random');
      PickUpMouseEvery(5 + Random(10));
      RandomRClickEvery(15 + Random(5));
      if (KillScriptTime > 0) then
        KillScript(KillScriptTime);
    end;

    procedure AntiRandom;
    begin
      FindTalk;
      FindNormalRandoms;
      if (FindFight = true) then
      begin
        RunAwayDirection('N');
        Wait(10000 + random(2000));
        RunBack;
      end;
    end;

    procedure ProgressReport;
    begin
      ClearDebug;
      Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
      Writeln('You have completed ' + IntToStr(Loads) + ' Loads' + '    ');
      Writeln('Worked For : ' + ScriptTime2(2))
        Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
    end;

    procedure FindTree;
    begin
      repeat;
        wait(1000 + random(500));
        if FindColorSpiralTolerance(p, o, TreeColors, 3, 3, 514, 338, 10) then
        begin
          IsAxeBroken;
          MMouse(p, o, 3, 3); // more random, coord.
          Wait(50 + random(25));
          if (IsUpText('hop')) then // Check up text.
          begin
            wait(200 + random(100));
            AntiRandom;
            Mouse(p, o, 1, 1, true);
            Clicks := Clicks + 1;
            wait(4000 + random(500));
            EntChecker;
            TheFindAxe;
          end;
        end;
        Wait(3000 + random(500)); // So it won't endlessly click.
        AntiRandom;
      until (InvFull);
    end;

    procedure DropLogs;
    begin
      wait(100 + random(50));
      wait(2000 + random(1000));
      AntiRandom;
      dropto(2, 28);
      Loads := Loads + 1;
      wait(100 + random(50));
      AntiRandom;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      if not Loggedin then LoginPlayer;
      LoginPlayer;
      HighestAngle;
      MakeCompass('N')
      repeat
        if (not (LoggedIn)) then
          Exit;
        GetAxeColors;
        AntiRandom;
        AntiBanning;
        FindTree;
        DropLogs;
        AntiRandom;
        AntiBanning;
        ProgressReport;
      until (false)
    end.

    and when i run it, it logs my char in, then gets axe head color, but then i get this error.


    [Runtime Error] : Exception: Access violation at address 006A8E54 in module 'scar.exe'. Read of address 00000034 in line 316 in script C:\Program Files\SCAR 3.06\includes\srl\srl\core\Text.scar


    can anyone help me here

  2. #2
    Join Date
    Mar 2007
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program WoodCutter;
    {.include SRL\SRL.Scar}
    {.include SRL\SRL\Extended\xAntiBan.scar}
    {.include SRL\SRL\Extended\xAntiRandoms.scar}
    {.include SRL\SRL\Skill\Woodcutting.SCAR}

    var
      o, p: integer;
      Clicks: Integer;
      Loads: Integer;
      BrokenAxeDTM, RegularAxeDTM : Integer;
      TheTreeName : String;
      TreeColor   : Integer;

    const
      TreeColors = 2904136;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '******';
      Players[0].Pass := '******';
      Players[0].Nick := '******'; //3 - 4 letters of YOUR username, example: sern
      Players[0].Active := True;
    end;

    Procedure GetAxeColors;     // taken from fours script
    Begin
    Wait(100)
    MakeCompass('S');
    GameTab(4)
    FindAxeHeadColor;
    MakeCompass('N')
    end;

    Var
      EX, EY : integer;              // taken from fours script
      FX, FY : integer;
    Procedure EntChecker;
    Begin
      Status('Checking For Ent')            // taken from fours script
      Flag;
      If (FindObjMultiText(EX, EY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
      Begin
        MMouse(Ex, EY, 0, 0)
          If FindColorTolerance( FX, FY, 55769, 85, 15, 115, 15, 20) then
          Begin
            Status('Ent Found');
            MouseFindFlag(648,83,5,5);                // taken from fours script
            Wait(15000+Random(5000));
            EntsAvoided := EntsAvoided + 1
          end;
       end;
    end;

    Var
      BX, BY, NX, NY : integer;

    Procedure IsAxeBroken;               // taken from fours script
    Begin
      Status('Checking for broken axe')
      GameTab(4)
      Wait(400 + Random (100))
      If (Not(FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 ))) then
      Begin
        Status('Axe Not Broken')         // taken from fours script
        Exit;
      end;
      Begin
        If (FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 )) and
           (Not(FindDTM(RegularAxeDTM, NX, NY, MIX1, MIY1, MIX2, MIY2))) then
        Begin
          Status('Broke an Axe, and you have no more.')
          NextPlayer(False)
          end;                          // taken from fours script
       end;
    end;

    Procedure TheFindAxe;
    Begin                          // taken from fours script
    Status ('Looking For Axe')
    FindHead;
    end;                           // taken from fours script

    procedure AntiBanning;
    begin
      RotateEvery(20 + Random(10));
      LeaveScreenEvery(5 + Random(5));
      HoverEvery(15 + Random(5), 'random');
      PickUpMouseEvery(5 + Random(10));
      RandomRClickEvery(15 + Random(5));
      if (KillScriptTime > 0) then
        KillScript(KillScriptTime);
    end;

    procedure AntiRandom;
    begin
      FindTalk;
      FindNormalRandoms;
      if (FindFight = true) then
      begin
        RunAwayDirection('N');
        Wait(10000 + random(2000));
        RunBack;
      end;
    end;



    procedure FindTree;
    begin
      repeat;
        wait(1000 + random(500));
        if FindColorSpiralTolerance(p, o, TreeColors, 3, 3, 514, 338, 10) then
        begin
          IsAxeBroken;
          MMouse(p, o, 3, 3); // more random, coord.
          Wait(50 + random(25));
          if (IsUpText('hop')) then // Check up text.
          begin
            wait(200 + random(100));
            AntiRandom;
            Mouse(p, o, 1, 1, true);
            Clicks := Clicks + 1;
            wait(4000 + random(500));
            EntChecker;
            TheFindAxe;
          end;
        end;
        Wait(3000 + random(500)); // So it won't endlessly click.
        AntiRandom;
      until (InvFull);
    end;

    procedure DropLogs;
    begin
      wait(100 + random(50));
      wait(2000 + random(1000));
      AntiRandom;
      dropto(2, 28);
      Loads := Loads + 1;
      wait(100 + random(50));
      AntiRandom;
    end;


    procedure ProgressReport;
    begin
      ClearDebug;
      Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
      Writeln('You have completed ' + IntToStr(Loads) + ' Loads' + '    ');
      Writeln('Worked For : ' + ScriptTime2(2))
        Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      if not Loggedin then LoginPlayer;
      LoginPlayer;
      HighestAngle;
      MakeCompass('N')
      repeat
        if (not (LoggedIn)) then
          Exit;
        GetAxeColors;
        AntiRandom;
        AntiBanning;
        FindTree;
        DropLogs;
        AntiRandom;
        AntiBanning;
        ProgressReport;
      until (false)
    end.


    Try that? :S Idk, that might work...

    P.S: i'm busy ATM so thats just a quick change, if you're wondering, i put the proggie last ;0


    -Ashur
    Exam period.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 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
  •