Results 1 to 6 of 6

Thread: What is wrong with this script?

  1. #1
    Join Date
    Feb 2013
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default What is wrong with this script?

    I have no idea what i did wrong, i just want a simple script that will drop my logs after a full inventory..

    Code:
    program Drop;
    {$i srl/srl.simba}
    {$I P07Include.Simba}
    
    
    
    begin
    
    
    
    
    procedure Drop;
      begin
    if (P07_InvFull) then
     begin
    P07_DropAllExcept([1]);
       end;
        end;
        end.

    Says identifier expected at the "Procedure" line

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Simba Code:
    program Drop;
    {$i srl/srl.simba}
    {$I P07Include.Simba}

    begin
    SetUpP07Include;
    ActivateClient;

      if (P07_InvFull) then P07_DropAllExcept([1]);

    end.

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Simba Code:
    program Drop;
    {$i srl/srl.simba}
    {$I P07Include.Simba}

    procedure Drop;
    begin
    if (P07_InvFull) then
      P07_DropAllExcept([1]);
    end;

    begin
      SetUpP07Include;
      ActivateClient;
      Drop;
    end.

    procedures must go before program's begin end.
    Last edited by DannyRS; 03-03-2013 at 10:09 PM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  4. #4
    Join Date
    Feb 2013
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Thank you, although i would like to learn why i did not have to make a procedure, and does activateclient always have to be in the code to recognize the client you select?

  5. #5
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Simba Code:
    program Drop;
    {$i srl/srl.simba}
    {$I P07Include.Simba}

    procedure Drop;
    begin
    if (P07_InvFull) then
      P07_DropAllExcept([1]);
    end;

    begin
      Drop;
    end.

    procedures must go before program's begin end.
    Where is your setupP07Include

    Quote Originally Posted by duke4eva View Post
    Thank you, although i would like to learn why i did not have to make a procedure, and does activateclient always have to be in the code to recognize the client you select?
    Since it's only one line, I didn't bother making a function/procedure for it. But DannyRS did it in his example.

    ActivateClient is so that the Runescape Browser gets activated ( if it's behind other tasks, it'll pop-out to the front )

    Creds to DannyRS for this wonderful sig!

  6. #6
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Where is your setupP07Include
    Haha, good spot, can't even use my own Include right (I do use srl-007 now tho)


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

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
  •