Results 1 to 4 of 4

Thread: error with bitmap

  1. #1
    Join Date
    May 2007
    Location
    Canada eh :p
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default error with bitmap

    how come i keep getting this error whenever i try to free a bitmap.


    [Runtime Error] : Exception: Access violation at address 006A892D in module 'scar.exe'.

    its weird i only get it when i free a bitmap but not when I load or use one. Can anybody help?
    im useing scar3.06 if it helps.

    ok i tried that and still wont work. Ill post my script. see if you can see anything that may cause it.
    SCAR Code:
    program FallyOakcutter;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/WoodCutting.scar}
    var
      trees, Tree, Banker, treee, I: Integer;
      walk: boolean;
      Robin: Boolean;

    const
      TreeColor = 2254936;
      TreeColor2 = 4821128;



    procedure Walker;
    begin
      HighestAngle;
      writeLn('Trying to find bank on minimap');
      Banker := BitmapFromString(14, 9, 'z78DA737276B2B03477' +
        '1A2547C9114302003B7FB4A3');
      Banker := AutoColorThis(banker, 80, MMx1, MMy1, MMx2, MMy2)
        WriteLn('Found bank on mini map!');
      RadialWalk(banker, 396, 334, 42, 0, 0);
      wait(300 + random(500));
      Flag;
      wait(100 + random(100));
    end;


    procedure findmaceshop;
    var
      xc, xy: Integer;

    begin
        MakeCompass('N');
      wait(100 + Random(300));
      if (FindSymbol(xc, xy, 'Mace Shop')) then
      begin
        Writeln('Found MaceShop Symbol');
        Mouse(xc, xy, 3, 2, true);
        flag;
        wait(200 + random(500));
      end else
      FindSymbol(x, y, 'water source');
        WriteLn(' trying to Find water source');
        Mouse(x, y, 3, 2, true);
        WriteLn('Found Water Source');
        wait(500 + random(300));
        Flag;
        wait(500 + random(300));
        FindSymbol(x, y, 'Mace Shop');
        Mouse(x, y, 2, 1, True);
        WriteLn('FoundMaceShop');
        flag;
        Wait(200 + random(400));
    end;


    procedure Checker;
    var
      ex, ey: Integer;

    begin
      wait(500 + random(500));
      if (FindSymbol(ex, ey, 'Hair Dresser')) then
      begin
        Writeln('Hair Dresser Is Found Player is not lost');
        exit;
      end else
        WriteLn('Player Is Lost');
      NextPlayer(True);
    end;


    procedure walktotree;
    var
      TheColor: Integer;
    begin
      WriteLn('Attempting To Walk To trees');
      wait(400 + random(300));

      trees := BitmapFromString(20, 15, 'z78DA33333037347432' +
        '1B2547495A936638C8A162AFA1B98191390A3950F6E277C340D98' +
        'BCB25F4B7173F696C6E62E88A851CB51797BDA4A6225C3652622F' +
        '31A4B19933D0042C24617B01C16177FA');

      wait(200 + random(500));
      TheColor := AutoColorThis(Trees, 250, MMx1, MMy1, MMx2, MMy2)
        WriteLn('Found Trees');
      RadialWalk(TheColor, 331, 389, 60, 2, 3);
      wait(8000 + random(500));
      Flag;
      wait(500 + random(400));
    end;


    procedure Walktomini;
    begin
      MakeCompass('N');
      WriteLn('trying to find Trees on mini Map');
      wait(100 + random(500));

      Treee := BitmapFromString(20, 24, 'z78DAB596590EC2300' +
        'C44AFE4A60DC92FB4E5FE4702EA4A4C706D262C7C8CA214F9D993' +
        'C529529734CA7958458671CA9254F7993957A9A8A7B95ED260B5E' +
        '43ED5F896AB9AD63CCA95E1F6D22DEB40BFE05AC73C6ECA29B7B5' +
        '6BD57BEDDB0CC3B539A38AFEC06DE57ACAD4EB79D5F8561EFB0A1' +
        '533F188E3252D522C9759298FAB14E56A7CA4C4B5F3BB85E71679' +
        '7EC51C62E755A7E97E72A471C9FABC1175ACAC98CBD0AD6F1E17D' +
        '757FFAF63A5630EBFE25ACF5179627C6FC45CEB307F9A7AB9E824' +
        'FA833BED07B7A5BCB2AC6A34EF64FD9BDBAB3C175793E7F67640E' +
        '4DA1DDB68FE223EC1B5639E6E3B5DACF109FD8CCBD0E35B88E1C6' +
        'FDCECBC1EBB30DB11E730F3A9D97C3366FDF57FB4EAE40B1FAD9E' +
        'B08C61EF70D9D7E9BED7188F7E49B4A433A2AF6D9B26CF38EDE00' +
        '0E10659A');

      wait(500 + random(500));
      treee := AutoColorThis(Trees, 150, MMx1, MMy1, MMx2, MMy2)
        WriteLn('Found trees on mini map!');
      RadialWalk(treee, 308, 249, 70, 3, 3);
      wait(200 + random(500));
      Flag;
      wait(300 + random(1000));
    end;

    procedure FreeBmps;
    begin
    FreeBitmap(trees);
    FreeBitMap(Treee);
    FreeBitMap(Banker);
    end;



    begin
      SetUpSRL;
      ActivateClient;
      wait(2000);
      SetRun(true);
      Walker;
      wait(500 + random(800));
      FindMaceShop;
      Checker;
      WalkToTree;
      WalkToMini;
      FreeBmps;
      wait(500 + random(800));
      Wait(300 + random(400));
    end.

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You probably have a procedure called BPMs or something, and you forgot to declare it in the main loop, so the script can't access that bitmap.

  3. #3
    Join Date
    May 2007
    Location
    Canada eh :p
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    tried that doesnt work.

    EDIT: i tried scar2.03 and it now works but it wouldnt with divi 3.06. thanks anyways

  4. #4
    Join Date
    May 2007
    Location
    Wellington, New Zealand
    Posts
    240
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I get the same thing, all the bitmaps are loaded, it's just when it searchs for it happens.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find Bitmap in Bitmap file
    By fORCE_wORKS in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 12-13-2007, 11:04 PM
  2. mining bitmap error
    By jhildy in forum OSR Help
    Replies: 5
    Last Post: 06-01-2007, 08:53 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
  •