Results 1 to 5 of 5

Thread: Some scripting help

  1. #1
    Join Date
    Mar 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Some scripting help

    Edit, I solved the problems myself! Thanks all for trying tho! <3


    So, yeah. I'm trying to create a basic Maple chop/fletch/dropper to level up my fletching, the problem is, I get this same error everytime I run my script and can't figure out what is causing it :/

    Simba Code:
    program Kanin_Maple_fletcher;
    {$I SRL/SRL.Simba}
    {$I P07Include.Simba}

    var x,y,Knifecol,Logcol: integer;


    Procedure P07_DeclarePlayer;
    begin
      P07_PlayerName := '';
      P07_PlayerPass := '';
    end;

    procedure WaitHumanClick;
    begin
      case random(600) of
        1..450: Wait(RandomRange(0, 100));
        451..570: Wait(RandomRange(0, 200));
        571..590: Wait(RandomRange(0, 600));
        591..600: Wait(RandomRange(400, 1100));
      end;
    end;

    Procedure Maple;
    begin
        if P07_FindObjCustom(x, y, ['Chop down', 'Maple tree'], [22149,13393,3435667],15) then
        begin
            repeat
            WaitHumanClick;
            wait (randomrange (100, 250));
            ClickMouse2(mouse_left);
            wait (randomrange (100, 300));
            wait (randomrange (3500, 5000));
            Until (InvFull);
        end;
    end;

    Procedure Fletch ;
    begin
    Knifecol:=9408666;
    Logcol:= 3303564;
        if P07_FindObjCustom (x, y, ['Use', 'Knife'], [Knifecol,7039860,7960961], 10) then
        begin
           Clickmouse2(mouse_right);
           wait(randomrange(50, 150));
           P07_ChooseOptionMulti(['Use']);
           wait (randomrange (300, 450));
        if P07_FindObjCustom (x, y, ['Maple logs'], [Logcol,937073,607333], 10) then
        begin
           Clickmouse2(mouse_left);
           wait(randomrange(58,89));
           Mmouse(x, y, 273, 411);
           ClickMouse2(mouse_left);
           P07_ChooseOptionMulti(['Make X']);
           wait(randomrange(310, 400));
           P07_TypeFast('33');
           Keydown(13);
           wait(RandomRange(48432,51130));
        end;
        end;
    end;


    begin
    SetupP07Include;
    ActivateClient;
    P07_DeclarePlayer;


    repeat
      repeat
      Maple;
      until(InvFull);
      Fletch;
      wait (randomrange (500, 800));
      P07_DropAllExcept([1]);
    until(not P07_LoggedIn);

    end.

    The error message I'm getting is
    Simba Code:
    Error: Exception: The bitmap[0] does not exist at line 664
    The following DTMs were not freed: [0, 1, 2, 3]

    If anyone could help, I would be honored to have your help T.hanks all!
    Last edited by Caniz; 03-19-2013 at 06:53 PM. Reason: Figured it out!

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    You don't even have 664 lines of code.

    What is it doing when the error occurs? Have you tried debugging it? I'd put writelines all throughout so you can see what's being executed when the error happens.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Mar 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You lost me a bit, I'm not exactly sure what you mean with debugging it, since I'm only aware of debug box down below.. (Yes, I am a noob)

    The bot begins chopping wood, and then after around 10 seconds that error message appears.
    Looks like I forgot to mention, it opens up "globals" window, where the message points to an empty line :/

    Simba Code:
    (*
    GetFightBarTPA
    ~~~~~~~~~~~~~~

    .. code-block:: pascal

        Function GetFightBarTPA(SearchArea: TBox): TPointArray;

    Used in various fighting functions, including srl_InFight

    .. note::

        by Narcle

    Example:

    .. code-block:: pascal


    *)
    This is the part from "globals" where the error is pointing at.
    Last edited by Caniz; 03-19-2013 at 03:52 PM.

  4. #4
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default

    SetupSRL must be before SetupP07Include;
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

  5. #5
    Join Date
    Mar 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    If I add SetupSRL the script goes all wild, mouse getting all crazy and not clicking a single thing :/

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
  •