Results 1 to 13 of 13

Thread: Using DropAll?

  1. #1
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using DropAll?

    Hey, I'm trying to compile a script using DropAll just so that I can powermine.
    I'm having problems. Here's my script:
    SCAR Code:
    {[----------------------------------------]]
    [[-------------program DropAll-------------]]
    [[-(1) Clears debug screen ----------------]]
    [[-(2) Drops entire inventory -------------]]
    [[-----------------------------------------]]
    [[-- Useful for: --------------------------]]
    [[-(1) Powerleveling ----------------------]]
    [[-----(Mining, woodcutting, etc.)---------]]
    [[-(2) Clearing your bank -----------------]]
    [[-(3) Drop trading (not recommended)------]]
    [[-----------------------------------------]]
    [[-- Procedures: --------------------------]]
    [[-(1) Waits until your inventory is full--]]
    [[-(2) Drops your entire inventory! -------]]
    [[-----------------------------------------]]
    [[-------(c)Zeeky111-----------------------]]
    [[-----------------------------------------]}


    program DropAll;
    {.include SRL/SRL.scar};

    procedure SetupScript;
    begin
         ClearDebug;
    end;

    procedure WaitForFull;
    begin
         if not (InvFull) then
         begin
              until (InvFull) do
              Wait(50);
         end else
         begin
              DropAll;
         end;
    end;

    begin
         SetupScript;
         WaitForFull;
    end.

    It's my first script in a good 4 months, so I'm expecting some pretty obvious corrections. Thanks all.
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  2. #2
    Join Date
    Oct 2009
    Location
    Connersille, Indiana
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You don't have setupSRL in the script setup/main loop... im not sure if you just left it out for this post or you forgot it, but i'm still learning scripting so hope i helped.

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

    Default

    This is what you should have:
    SCAR Code:
    program DropAll;
    {.include SRL/SRL.scar};

    procedure SetupScript;
    begin
      SetupSRL;
      ClearDebug;
    end;

    procedure WaitForFull;
    begin
      if(not(InvFull))then
      begin
        repeat
          Wait(50);
        until(InvFull);
      end else
      begin
        DropAll;
      end;
    end;

    begin
      SetupScript;
      WaitForFull;
    end.

    ~Camo
    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.


  4. #4
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Program yea;
    {.include srl/srl.scar}

    procedure SetupScript;
    begin
         SetUpSRL;
         ClearDebug;
    end;

    procedure WaitForFull;
    begin
      if not (InvFull) then
        begin
          repeat
            Wait(50);
          until(invfull)
          DropAll;
        end;
    end;

    begin
         SetupScript;
         WaitForFull;
    end.

    -Enhanced version. ; - Not needed after {.include srl/srl.scar}
    -Your WaitForFull procedure was way messed up.
    -Your program name or procedure name can not be the same as a SRL function or you will get duplicate identifier.
    -SetUpSRL; is needed for calling upon SRL when you include it Ex {.include SRL/SRL.scar}

    Don't take this rude, because it isn't. Read a few more tutorials though. You need a help on else, until, do, begins, and ends. Again, don't take this harshly.

    edit: Ninjad

  5. #5
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -facepalm-

    Yeah thanks guys. Lol.
    I literally just facepalmed at all the stupid mistakes I made in such a simple script.
    Thanks again, I would have expected a lot more flaming.

    EDIT: Okai! Moar problems. :3
    Here's the new, edited code:
    SCAR Code:
    {[----------------------------------------]]
    [[-------------program DropAll-------------]]
    [[-(1) Clears debug screen ----------------]]
    [[-(2) Drops entire inventory -------------]]
    [[-----------------------------------------]]
    [[-- Useful for: --------------------------]]
    [[-(1) Powerleveling ----------------------]]
    [[-----(Mining, woodcutting, etc.)---------]]
    [[-(2) Clearing your bank -----------------]]
    [[-(3) Drop trading (not recommended)------]]
    [[-----------------------------------------]]
    [[-- Procedures: --------------------------]]
    [[-(1) Waits until your inventory is full--]]
    [[-(2) Drops your entire inventory! -------]]
    [[-----------------------------------------]]
    [[-------(c)Zeeky111-----------------------]]
    [[-----------------------------------------]}


    program DropAll;
    {.include SRL/SRL.scar};

    procedure SetupScript;
    begin
      SetupSRL;
      ClearDebug;
    end;

    procedure WaitForFull;
    begin
      if (not(InvFull)) then
        begin
          repeat
            Wait(50);
          until(InvFull);
        end else
        begin
          DropAll;
        end;
    end;

    begin
      SetupScript;
      WaitForFull;
    end.

    And.. Here's my problem:

    Code:
    Failed when compiling
    Line 0: [Error] (20:24): 'BEGIN' expected in script C:\Program Files\SCAR 3.22\includes\SRL\SRL.scar
    Help? Pl0x..?
    Last edited by zeeky111; 12-25-2009 at 12:34 AM. Reason: D'you really think I'm dumb enough to double post? Oh.. Okai..
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  6. #6
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {.include srl/srl.scar}

    The ';' after that is not needed.

  7. #7
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by zeeky111 View Post
    Code:
    Failed when compiling
    Line 0: [Error] (20:24): 'BEGIN' expected in script C:\Program Files\SCAR 3.22\includes\SRL\SRL.scar
    Help? Pl0x..?
    If you take a look at what SCAR has written in the debug box then you will notice that it says a filepath
    The filepath you see there is the path to the SRL include, have you downloaded SRL correctly?
    Redownloading SRL will solve this problem

    EDIT: ..or remove the semi-colon.. works too
    Last edited by Zyt3x; 12-25-2009 at 04:55 PM.

  8. #8
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Zyt3x he just has to remove the semicolon ;P
    Ce ne sont que des gueux


  9. #9
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ..I'm not even going to comment on that, I think it was a dumber mistake than me screwing up WaitForFull.

    Gah, leave out the semicolon! Ugh, that's kinda dumb. My bad y'all.

    EDIT: Hei, it worked!!
    Now I feel dumb. But still thanks everyone for putting up with my n00bishness..
    Last edited by zeeky111; 12-25-2009 at 08:17 AM. Reason: avoid 2x post
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  10. #10
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    No problem! We all have to (re-?)learn
    Ce ne sont que des gueux


  11. #11
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, I'm re-learning.. Somewhat.

    Another scripting question:
    Imagine that I'm a skiller with an attack level of 9. I get to mining level 21 and suddenly oh boy, I can use a mith pick! I'm happy. -ahem-
    So if I wanted to solve the powerminer's dilemma of dropping all but the item in the first slot, what ungodly kinds of delusion and insanity would I encounter in the process of attempting to script as such?
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  12. #12
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    DropAllExcept?
    Ce ne sont que des gueux


  13. #13
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Usage..?
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

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
  •