Results 1 to 7 of 7

Thread: Access Violation Error.

  1. #1
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Access Violation Error.

    I keep getting that error, please help. This is my 2nd Public script.
    this is the nasty little error


    program New;
    {.include srl/srl.scar}
    {.SRL\Core\Bank.scar}
    {.SRL\Core\Inventory.scar}
    {.SRL\Core\FlagChat.scar}

    var
    x,y,i,counter,Loads :integer;
    Const
    LoadsToDo = 9999;

    procedure DeclarePlayers;
    begin
    HowManyPlayers :=1; //How many players to use in script
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer :=0;

    Players[0] .Name := ''; // Username
    Players[0] .Pass := ''; // Pass
    Players[0] .Nick := ''; //3/4 of the characters name (bobbey = bob)
    Players[0] .Active := True; // True=yes, False=no//
    Players[0] .Booleans[1] := False; // False for brightness Check Once. Just leave at false.
    Players[0] .Pin := '0000'; // Your BANK-Pin - Leave at 0000 if you don't have a pin
    end;

    procedure GetFlax;
    begin
    Setangle('Highest');
    FindObjCustom(x, y, ['ban', 'ooth'], [5005424,8226446], 5);
    Mouse(x,y,5,5,false);
    wait(800+random(300));
    chooseoption('uickly');
    wait(800+random(600));
    begin
    Mouse(54,106,5,5,false)
    wait(800+random(340));
    ChooseOption('X');
    wait(800+random(300));
    Typesend('28');
    wait(200+random(100));
    CloseBank;
    end;
    end;

    Procedure Walk1;
    begin
    Mouse(622,128,5,5,true);
    Wait(1200+random(400));
    repeat
    until FindObjCustom(x, y, ['stair', 'case'], [8160133,4346978], 5) or (counter=20);
    wait(600+random(100));
    Mouse(x,y,5,5,false);
    ChooseOption('own');
    wait(800+random(500));
    end;

    Procedure Walk2;
    begin
    wait(500+random(800));
    Mouse(639,55,5,5,true);
    wait(1000+random(500));
    end;

    Procedure Spin;
    begin
    repeat
    until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or (counter=20);
    Mouse(x,y,5,5,true);
    Wait(2000+random(400));
    Mouse(265,119,5,5,false);
    wait(500+random(800));
    ChooseOption('X');
    Wait(300+random(400));
    TypeSend('28');
    HoverSkill('crafting',False );
    wait(46000+random(4000));
    end;

    Procedure Walk3;
    begin
    Mouse(611,97,5,5,true);
    wait(2500+random(500));
    FindObjCustom(x,y, ['air', 'case'], [6712686,8028803], 5);
    Mouse(x,y,5,5,false);
    wait(500+random(600));
    chooseoption('up');
    wait(500+random(700));
    end;

    Procedure BankFlax;
    begin
    Mouse(636,44,5,5,true);
    wait(6200+random(900));
    FindObjCustom(x, y, ['ban', 'ooth'], [5005424,8226446], 5);
    Mouse(x,y,5,5,false);
    wait(800+random(300));
    chooseoption('uickly');
    wait(800+random(600));
    Mouse(659,263,5,5,false);
    wait(400+random(400));
    ChooseOption('28');
    wait(400+random(400));
    begin
    Mouse(54,106,5,5,false)
    wait(800+random(340));
    ChooseOption('X');
    wait(800+random(300));
    Typesend('28');
    wait(300+random(100));
    Mouse(486,35,5,5,true);
    end;
    end;


    begin
    SetupSRL;
    ActivateClient;
    DeclarePlayers;
    GetFlax;
    repeat
    Walk1;
    Walk2;
    Spin
    Walk3;
    BankFlax;
    until (Loads>=LoadsToDo);
    end.

  2. #2
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Please post your code inside [scar] tags.

  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I refuse to read that until it is in SCAR tags.

  4. #4
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    All for you, my lovely Da 0wner.
    Note: You never said anything about standards.

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    {.SRL\Core\Bank.scar}
    {.SRL\Core\Inventory.scar}
    {.SRL\Core\FlagChat.scar}

    var
    x,y,i,counter,Loads :integer;
    Const
    LoadsToDo = 9999;

    procedure DeclarePlayers;
    begin
    HowManyPlayers :=1; //How many players to use in script
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer :=0;

    Players[0] .Name := ''; // Username
    Players[0] .Pass := ''; // Pass
    Players[0] .Nick := ''; //3/4 of the characters name (bobbey = bob)
    Players[0] .Active := True; // True=yes, False=no//
    Players[0] .Booleans[1] := False; // False for brightness Check Once. Just leave at false.
    Players[0] .Pin := '0000'; // Your BANK-Pin - Leave at 0000 if you don't have a pin
    end;

    procedure GetFlax;
    begin
    Setangle('Highest');
    FindObjCustom(x, y, ['ban', 'ooth'], [5005424,8226446], 5);
    Mouse(x,y,5,5,false);
    wait(800+random(300));
    chooseoption('uickly');
    wait(800+random(600));
    begin
    Mouse(54,106,5,5,false)
    wait(800+random(340));
    ChooseOption('X');
    wait(800+random(300));
    Typesend('28');
    wait(200+random(100));
    CloseBank;
    end;
    end;

    Procedure Walk1;
    begin
    Mouse(622,128,5,5,true);
    Wait(1200+random(400));
    repeat
    until FindObjCustom(x, y, ['stair', 'case'], [8160133,4346978], 5) or (counter=20);
    wait(600+random(100));
    Mouse(x,y,5,5,false);
    ChooseOption('own');
    wait(800+random(500));
    end;

    Procedure Walk2;
    begin
    wait(500+random(800));
    Mouse(639,55,5,5,true);
    wait(1000+random(500));
    end;

    Procedure Spin;
    begin
    repeat
    until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or (counter=20);
    Mouse(x,y,5,5,true);
    Wait(2000+random(400));
    Mouse(265,119,5,5,false);
    wait(500+random(800));
    ChooseOption('X');
    Wait(300+random(400));
    TypeSend('28');
    HoverSkill('crafting',False );
    wait(46000+random(4000));
    end;

    Procedure Walk3;
    begin
    Mouse(611,97,5,5,true);
    wait(2500+random(500));
    FindObjCustom(x,y, ['air', 'case'], [6712686,8028803], 5);
    Mouse(x,y,5,5,false);
    wait(500+random(600));
    chooseoption('up');
    wait(500+random(700));
    end;

    Procedure BankFlax;
    begin
    Mouse(636,44,5,5,true);
    wait(6200+random(900));
    FindObjCustom(x, y, ['ban', 'ooth'], [5005424,8226446], 5);
    Mouse(x,y,5,5,false);
    wait(800+random(300));
    chooseoption('uickly');
    wait(800+random(600));
    Mouse(659,263,5,5,false);
    wait(400+random(400));
    ChooseOption('28');
    wait(400+random(400));
    begin
    Mouse(54,106,5,5,false)
    wait(800+random(340));
    ChooseOption('X');
    wait(800+random(300));
    Typesend('28');
    wait(300+random(100));
    Mouse(486,35,5,5,true);
    end;
    end;


    begin
    SetupSRL;
    ActivateClient;
    DeclarePlayers;
    GetFlax;
    repeat
    Walk1;
    Walk2;
    Spin
    Walk3;
    BankFlax;
    until (Loads>=LoadsToDo);
    end.

  5. #5
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry, i did not know how to put it inside the tags.

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include srl/srl.scar}

    var
      x, y, i, counter, Loads : integer;

    COnst
      LoadsToDo = 9999;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //How many players to use in script
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Pass
      Players[0].Nick := ''; //3/4 of the characters name (bobbey = bob)
      Players[0].Active := True; // True=yes, False=no//
      Players[0].Booleans[1] := False; // False for brightness Check Once. Just leave at false.
      Players[0].Pin := '0000'; // Your BANK-Pin - Leave at 0000 if you don't have a pin
    end;

    procedure GetFlax;
    begin
      Setangle('Highest');
      FindObjCustom(x, y, ['ban', 'ooth'], [5005424,8226446], 5);
      Mouse(x,y,5,5,false);
      wait(800+random(300));
      chooseoption('uickly');
      wait(800+random(600));
      Mouse(54,106,5,5,false)
      wait(800+random(340));
      ChooseOption('X');
      wait(800+random(300));
      Typesend('28');
      wait(200+random(100));
      CloseBank;
    end;

    Procedure Walk1;
    begin
      Mouse(622,128,5,5,true);
      Wait(1200+random(400));
      FindObjCustom(x, y, ['stair', 'case'], [8160133,4346978], 5);
      wait(600+random(100));
      Mouse(x,y,5,5,false);
      ChooseOption('own');
      wait(800+random(500));
    end;

    Procedure Walk2;
    begin
      wait(500+random(800));
      Mouse(639,55,5,5,true);
      wait(1000+random(500));
    end;

    Procedure Spin;
    begin
      FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5);
      Mouse(x,y,5,5,true);
      Wait(2000+random(400));
      Mouse(265,119,5,5,false);
      wait(500+random(800));
      ChooseOption('X');
      Wait(300+random(400));
      TypeSend('28');
      HoverSkill('crafting',False );
      wait(46000+random(4000));
    end;

    Procedure Walk3;
    begin
      Mouse(611,97,5,5,true);
      wait(2500+random(500));
      FindObjCustom(x,y, ['air', 'case'], [6712686,8028803], 5);
      Mouse(x,y,5,5,false);
      wait(500+random(600));
      chooseoption('up');
      wait(500+random(700));
    end;

    Procedure BankFlax;
    begin
      Mouse(636,44,5,5,true);
      wait(6200+random(900));
      FindObjCustom(x, y, ['ban', 'ooth'], [5005424,8226446], 5);
      Mouse(x,y,5,5,false);
      wait(800+random(300));
      chooseoption('uickly');
      wait(800+random(600));
      Mouse(659,263,5,5,false);
      wait(400+random(400));
      ChooseOption('28');
      wait(400+random(400));
      Mouse(54,106,5,5,false)
      wait(800+random(340));
      ChooseOption('X');
      wait(800+random(300));
      Typesend('28');
      wait(300+random(100));
      Mouse(486,35,5,5,true);
    end;


    begin
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      GetFlax;
      repeat
        Walk1;
        Walk2;
        Spin
        Walk3;
        BankFlax;
      until(Loads >= LoadsToDo);
    end.
    (h).
    Now let's see. Hold on.

    Which SRL Rev and SCAR version are you using?

  7. #7
    Join Date
    Oct 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    umm 3.20d and the latest srl
    i got it to work but it only does 1 load successfully i need to add better walking.

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
  •