Results 1 to 10 of 10

Thread: just got a runtime error

  1. #1
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default just got a runtime error

    ok so my script compiles right and stuff but i get this runtime error (also attachments aren't working for me either that or i can't use them properly lol s i have to post script)

    [Runtime Error] : Out Of Range in line 1103 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar


    here is the script
    SCAR Code:
    program VarrockEastIronMiner;
    {.include SRL/SRL.scar}
    //credits go to masterkill i used his basic anti randoms
    var
    invo, steelpick, mithpick, addypick, runepick, armour, x, y:integer;

    procedure loadbitmaps;//loads bitmaps
    begin
    mithpick := BitmapFromString(1, 89, 'beNpjYMAGGBlGIAAAAgAAA' +
           'g==');
    armour := BitmapFromString(45, 45, 'beNrtl1+LVVUYh48XkoQFZU' +
           'KaA6mMNIxCY53QqWTSKbT0ZqwLLSTS/uGA/9AgrFDqohBBMW/CC++' +
           '9E++iL1BX0sfoQ/TYUz9e9nZgr6HLs/lx2Gedvdb7rN/7rrXXGY1m' +
           'dmzdsnnDpo1PLx3ef2n5+IUvP0DcqPOfHc395fMnvOEB2tHpT5ZOf' +
           'nj4o/cPHV9a9BO9uzj/zFNPoOltm/bt2fnmeHY04Hru2fX0/eHrT/' +
           'u6evFj5A2fo9EaFBgExhcnjgAADGIiR997A4wDr88R/cl1a5kgGoj' +
           'ByET58ZvP0c3vz/B57coyCgYPAPDnw4ffXjzHTRi0QsGAYKgYDI6G' +
           'YNCXKIYWQ/kV6cP9e3dheGvhbUnICD4kI4hxjhz8z4q9u8dz07tmt' +
           'kNCdoZgMBRTdvphEENnEHGJfuPMMQQJX6emtsQKGeLG4r49ukHVUX' +
           'IDk8JouEHQWz9dQBVDEj51468HX6HvLp8Vw6QgMQKgMKQJg0HAIFx' +
           'lCIbSkD9+Po1k0I0kpVYFmn/t5VVgkBQYXAhJB7IlRUI6kAxY4a81' +
           'KbZoxSqSou167lDqt99/Rdzsnx9XN/zKT2SqPp8RLNEd219swnAtG' +
           'MUV4f3yqWN3frmNiEtjxFfb8yQ3dKxZA4PtqwnDlVLnpQgHCeLGuS' +
           'upbO/3MmuUR1NSSC57kfuGI0QZmdVhgsRw66hBO7I8mpJCgYHhbmk' +
           'pZgNnBQnDxAOgDxWgbhpZL61ugEHZu59XgLzakIZcu37DeghD3biy' +
           'iwajyQ1eRmKoPgPF81iMCmB0MNDBhVffWXiFBdtUomDwdjAvkuT97' +
           'qucX1OxqcmVMPgUAzdaMZhvH0OGbFP4gBspDNTHqLXRumDFkMTXd5' +
           'XblBtFMFy/lSQA+PAoI/9sX00YDAKD5tczVcVwy8rexacYpqb6IAZ' +
           'uzO16qdUNj09gdKzoYKRCVsIIA260YtA9hpgdeERyjXQWqWcPGm1J' +
           'ZYqRt/zunduaMOglRlWOdh0MX6MdjL4VLBPc2Dq1sRUjx9rKEIxYk' +
           'Rd6H8N1mvPGKpKCq46fQ13FCIOPmYK0d6zIQZSkNLlRMZDnW2V9Ov' +
           'G6QemGVdqpiljBebgVo679uikZru9/pz0A/x7/xrOrwMBDumf3q5t' +
           'ApxoTq1O3yQUMpEMG1FQbdhSgzstwdamu9FMHg6qQYeqF54dj0AUM' +
           'umuLriaWuxaxOPwbSNWf0jE+cNLgLd+EwfP2ZRAAjAJVx3lNi2q+H' +
           'k1hPOvftDBQGGDwz3EgBu7Ri76MgJ+GC0MwDBGJEZK0VwbEn0c0BI' +
           'PHKokh+kfcDkb/sZSlkmFmejMajiGJMKhzxLXRmeaZ/mNh0I0mjMk' +
           '1uSbX5Jpck+v/uf4GNZlc5Q==');
    steelpick := BitmapFromString(44, 44, 'beNrtllsLAUEYhmd/gy' +
           'slScmNC+XOD+BiJXLIMYtQQtIqkhu/3FvfNrtG41AzRszXm1apfeZ' +
           '5ZzKM2bHzE+NEYgYgl2RIIc2KWaYZw5Gl32otPG+/Xl0OB3zNp1Ka' +
           '3t5tNGRp12rjXnc5mQBDA0OwTHqRLIkYy8QZJBCD0jocrG7U6UQZm' +
           'tWqEALAfjj7Phg28zmEKCVxngYMtCeP2y1nmA76CklQriwEQBKQ02' +
           '4XZYBAfGKvaj6zoQSEm8F7iQHdoUcUOhsO9WDcSKDjwP3wo1R3Xew' +
           'ZPOg5s6EEDiA0yGEq5RK0qFYhtiBbYxRGdSOPJMhgXvylWgkSEjUS' +
           '7rfih/8lOcC7EnQwGJdgCCC8rvxxC1bCl0gIGQxKEIowIoGuCuYkB' +
           'AyIOQlfwhDcFc0VIdyI7NixY+e/5wo6xXwV');
    addypick := BitmapFromString(134, 132, 'beNrt2sFKAlEUgOGZB2g' +
           'T0SIKMaQQFAUlJYKCiIje/3nswOiYmOmoM97o+zjLVv6deyen2SxL' +
           '0uwfU0QRRRRRRBFFFFFEEUUUUUSRYxfJv40iJy+S315mMd2rbHCTH' +
           'R5Fkb0WYWXuRve9aW/0Opp+PirSSJH5x94ZdDZN96Hbf+qP38aK1F' +
           'xk3uL3HBdn2fV5FguyKJIrUk+RPH7zf8zR7rXLKXLEPTJ5n0SR4fM' +
           'wluWQLorsd3eUE0WKmz1ylEWKKX7g42WsSFPPWnm5IOtFYrNixeLG' +
           'r7ovihxYpMgRU25N5CiOuzjfVrsoUmuRlQVZ/cCXT8XFXRNpFGmmy' +
           'CLHlmuo1W1FnR2jKHKM82qnJ4Qdzy5FDl6QvMpfmnakjiLrF7rvfk' +
           '9cZMOFrshJiixzKJJakTpyKJJaDkX2ezmlSBpFmlgQRVJbEEVSWxB' +
           'FUlsQRaoWqTuHIqkdWYpUehXSQA5Fdi8So4giimx7G+g/sdP8Nl4R' +
           'RRRRRBFFFFFEEUUUUUQRRRRRBAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
           'AAAAAAAAAAAAADgr/kCr/yLyw==');
      runepick := BitmapFromString(52, 46, 'beNrtl01rwkAQhje/oae' +
           'CFBFEhFCEIIhCICBBaikeQsGvg4iHQv//uS+MTuJ217bQTAc6L+8h' +
           'AQ8Pz8zKxjmLJZSkUV1g6YNDs56bDtwf4SWxZuXz9OW1WB8Xh3e8j' +
           'rpdYapR8RTrY16OF6vZagM8QbazFmYItnPn+vcO0ohNZKwJbAAsyJ' +
           'bOCiqBYd/K/RvY8mqH+YoQJl8WbHQW5tsTs02WFUbcNiGWJ1YCI2k' +
           'owJpssA3tUg4DVlkayibBQ8uANSBCoMriXUmj48k++WhjIbGceJD9' +
           'b6mlMZi3CQw5nOQQKKXOn2bMSRNSarK3pMUgv/lLGWkRwnalfT4CS' +
           'm4dDPZTaZJsaqUpA6uvkTZNk/ZfpdVsCqV5A1Ulja5q+qSd2VB90p' +
           'SzXT6f1Q3Uu8FaLBaLxWKx/FI+AB5SZ2E=');
    end;
    procedure searchforpick;
    begin
    if (findbitmaptolerancein(mithpick, x, y, 526, 168, 760, 488, 25)) then
    writeln('found mith pick');
    if (findbitmaptolerancein(steelpick, x, y, 526, 168, 760, 488, 25)) then
    writeln('found steel pick');
    if (findbitmaptolerancein(addypick, x, y, 526, 168, 760, 488, 25)) then
    writeln('found addy pick');
    if (findbitmaptolerancein(runepick, x, y, 526, 168, 760, 488, 25)) then
    writeln('found rune pick');
    arrangeinv;
    end;


    procedure openinventory;//opens an unopened inventory
    begin
    gametab(4)
    end;

    procedure openwornquipment;
    begin
    if (FindBitmapToleranceIn(armour, x, y, 526, 168, 760, 488, 25)) then
    mouse(x, y, 0, 0, true)
    end;
    procedure findpick;
    begin
    openinventory;
    searchforpick;
    openwornquipment;
    searchforpick;
    end;
    Procedure Randoms;
    begin
      FindNormalRandoms;
      if FindFight then
      begin
        MakeCompass('n');
        mouse(630, 154, 5, 5, True);
        fflag(0);
        SleepAndMoveMouse(15000+random(5000));
        Mouse(630, 15, 5, 5, True);
        SleepAndMoveMouse(2000 + random(2000));
        fflag(0);
      end;
    end;
    begin
    setupSRL;
    loadbitmaps;
    activateclient;
    wait(2000);
    randoms;
    findpick;
    end.
    i kinda have to go now but if anyone knows whats up or even hasany suggestions for what ie done up to now please post
    thanks
    sandos1234


  2. #2
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Try to use DTM's. They are so much more accurate then bitmaps. I do like the function findbitmaptolerancein though. And DTM's are so much smaller, and create less lagg. Is it a mining script or just checking for the pick?
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  3. #3
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i dont know the answer... but ... why... WHY... YOU HEATHEN!!! GO DIE IN A HOLE!!!

    SCAR Code:
    procedure openinventory;//opens an unopened inventory
    begin
    gametab(4)
    end;

    WHYYY?!?
    ~ Metagen

  4. #4
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    erm its a mining script and i think i will try and use a dtm...tutorial island ftw?
    but erm whats wrong with that?
    and why should i die in a hole?


  5. #5
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    re download Srl. Thats should fix it.....Btw afterworlds when your done send the script to me. I'll add standards.....
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  6. #6
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    You're making SCAR load too much memory. Make it, load a bitmap when it is needed, then Free it afterwards But as other people have suggested, use a DTM since they don't use too much memory
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  7. #7
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    right...
    that might work ill redownload srl and do the bitmap thing you suggested dan
    thanks guys


  8. #8
    Join Date
    Dec 2006
    Location
    UK
    Posts
    118
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would load and free each bitmap (is you are still using them) and i need them. E.G.

    SCAR Code:
    function LoadPick(Pick: Integer): Integer;
    begin
      Case Pick of
        1: Result := BitmapFromText('BronzePickBitmap stuff here')
        2: Result := BitmapFromText('SteelPickBitmap stuff here')
        3: Result := BitmapFromText('AddyPickBitmap stuff here')
    end;

    procedure findpick;
    begin
      if FindBitmapToleranceIn(LoadPick(1), 948, 494, 949, 949) the
        writeln('Yey got bronze pick');

      if FindBitmapToleranceIn(LoadPick(2), 948, 494, 949, 949) the
        writeln('Yey got steel pick');

      if FindBitmapToleranceIn(LoadPick(3), 948, 494, 949, 949) the
        writeln('Yey got addy pick');
    end;

  9. #9
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey,
    I know the fix for it
    SCAR Code:
    [Runtime Error] : Out Of Range in line 1103 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
    That is, because antirandoms.scar searches for your nickname.
    But you DON'T have declareplayers in your script.
    Without that, the script can't run

    PvH

    EDIT:
    So there is no need to reinstall scar/srl or change your bitmaps (even though I recommend using dtms)

  10. #10
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    right...of course id need to use declare players and stuff...thats really basic, im ashamed thanks pvh


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
  •