Results 1 to 10 of 10

Thread: need some help with an error

  1. #1
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need some help with an error

    hi, ok so i recently made this rsc script now the thing is, it works very smoothly but after a while (can be 10 mins or 2 hours or whatever) this error comes up: [Runtime Error] : Exception: Can't allocate the DIB handle in line 37 in script.

    this is the script

    program AirRunePickup;
    var
    x, y, rune: integer;
    const
    username ='';
    password ='';

    procedure BitmapLoad;
    begin
    rune := BitmapFromString(14, 14,
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000FF9040FF9040FF9040FF9040FF90400000000000000 00000' +
    '000000000000000000000000000000000000FF90400000000 00000' +
    '000000FF9040FF90400000000000000000000000000000000 00000' +
    '000000000000FF9040000000000000000000FF9040FF90400 00000' +
    'FF9040FF9040000000000000FF9040FF9040000000FF90400 00000' +
    '000000000000FF9040FF9040000000FF9040FF90400000000 00000' +
    'FF9040FF9040000000FF9040FF9040FF9040FF9040FF90400 00000' +
    '000000FF9040FF9040000000000000FF9040FF9040000000F F9040' +
    '000000000000FF9040FF9040000000000000FF9040FF90400 00000' +
    '000000FF9040FF9040000000FF9040000000000000000000F F9040' +
    'FF9040000000FF9040FF9040000000000000FF9040FF90400 00000' +
    'FF9040000000000000000000FF9040FF9040000000FF9040F F9040' +
    '000000FF9040FF9040FF9040000000FF90400000000000000 00000' +
    '000000FF9040FF9040000000FF9040FF9040000000FF9040F F9040' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000000000000000000000000000000000000000');
    end;

    procedure Pickup;
    begin
    if (FindColorSpiral (x, y, 8616047, 416, 11, 929, 331)) then
    begin
    ClickMouse (x, y, False);
    wait(500);
    if (FindBitmap (rune, x, y)) then
    begin
    ClickMouse (x+2, y+2, True);
    Wait(1000);
    end;
    end;
    end;

    procedure Autologin;
    begin
    if (FindColorSpiral (x,y, 3472636, 500, 142, 505, 148)) then
    begin
    ClickMouse(680, 290,true);
    wait(500);
    Sendkeys(username);
    wait(500);
    ClickMouse(602,307,true);
    wait(500);
    SendKeys(password);
    wait(500);
    ClickMouse(830,250,true);
    wait(3000);
    ClickMouse(661,246,true);
    end;
    end;

    begin
    repeat
    BitmapLoad;
    Pickup;
    Autologin;
    until (False);
    end.

  2. #2
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    1. Please put in [SCAR] Tags.
    2. What is line 37

  3. #3
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well actually the script goes like this
    it logs in, picks up the runes when it gets logged out, it logs back in and then i get the error message

    line 37 :
    if (FindColorSpiral (x, y, 8616047, 416, 11, 929, 331)) then

    SCAR Code:
    program AirRunePickup;
    var
    x, y, rune: integer;
    const
    username ='';
    password ='';

    procedure BitmapLoad;
    begin
    rune := BitmapFromString(14, 14,
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000FF9040FF9040FF9040FF9040FF90400000000000000 00000' +
    '000000000000000000000000000000000000FF90400000000 00000' +
    '000000FF9040FF90400000000000000000000000000000000 00000' +
    '000000000000FF9040000000000000000000FF9040FF90400 00000' +
    'FF9040FF9040000000000000FF9040FF9040000000FF90400 00000' +
    '000000000000FF9040FF9040000000FF9040FF90400000000 00000' +
    'FF9040FF9040000000FF9040FF9040FF9040FF9040FF90400 00000' +
    '000000FF9040FF9040000000000000FF9040FF9040000000F F9040' +
    '000000000000FF9040FF9040000000000000FF9040FF90400 00000' +
    '000000FF9040FF9040000000FF9040000000000000000000F F9040' +
    'FF9040000000FF9040FF9040000000000000FF9040FF90400 00000' +
    'FF9040000000000000000000FF9040FF9040000000FF9040F F9040' +
    '000000FF9040FF9040FF9040000000FF90400000000000000 00000' +
    '000000FF9040FF9040000000FF9040FF9040000000FF9040F F9040' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000000000000000000000000000000000000000');
    end;

    procedure Pickup;
    begin
    if (FindColorSpiral (x, y, 8616047, 416, 11, 929, 331)) then
    begin
    ClickMouse (x, y, False);
    wait(500);
    if (FindBitmap (rune, x, y)) then
    begin
    ClickMouse (x+2, y+2, True);
    Wait(1000);
    end;
    end;
    end;

    procedure Autologin;
    begin
    if (FindColorSpiral (x,y, 3472636, 500, 142, 505, 148)) then
    begin
    ClickMouse(680, 290,true);
    wait(500);
    Sendkeys(username);
    wait(500);
    ClickMouse(602,307,true);
    wait(500);
    SendKeys(password);
    wait(500);
    ClickMouse(830,250,true);
    wait(3000);
    ClickMouse(661,246,true);
    end;
    end;

    begin
    repeat
    BitmapLoad;
    Pickup;
    Autologin;
    until (False);
    end.

  4. #4
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Move your plugins.
    Successfully compiled (81 ms)

  5. #5
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what u mean by move my plugins?

  6. #6
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Go includes > SRL > Place Inside Your Plugins
    Copy everything inside there.
    Paste to: Scar > Plugins

    Btw, you should have searched

  7. #7
    Join Date
    Apr 2007
    Location
    Melbourne, Aus
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    change this:
    SCAR Code:
    begin
    repeat
    BitmapLoad;
    Pickup;
    Autologin;
    until (False);
    end.
    to this:
    SCAR Code:
    begin
      BitmapLoad;
      repeat
        Pickup;
        Autologin;
      until (False);
    end.

    E: you should do some tutorials and use the srl include. your script is pretty detectable.

  8. #8
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    still learning

  9. #9
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by drolbakkes View Post
    still learning
    Your bitmap/dtm won't work, It has the encoding of 2.03 . Hence, you will have to create a new one.

  10. #10
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this fixed it thx alot give u a rep + for it

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
  •