Results 1 to 7 of 7

Thread: quick nooobie Q

  1. #1
    Join Date
    Nov 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default quick nooobie Q

    Hi, i've been learning scar for a couple of days and im still very much in the beginners tuts section.

    Just wondering if there is a command that will let me end a script before its run its course. Have found a few procedures but they contain more than i need (e-mailin and such).

    Figure there must be a short command that will do the trick.

    ie.
    endscript;
    exitscript;
    terminatescript;

    help appreciated.

  2. #2
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    TerminateScript is what you want.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  3. #3
    Join Date
    Nov 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank-you, cant believe i guessed it lol.

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by meyoume View Post
    Thank-you, cant believe i guessed it lol.
    It was meant to be that way

    There is also PauseScript if you are interested. Also, the script will call ScriptTerminate before teriminating if you set it up that way.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

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

    Default

    Quote Originally Posted by Nava2 View Post
    There is also PauseScript if you are interested. Also, the script will call ScriptTerminate before teriminating if you set it up that way.
    What Nava2 is trying to explain to you is that when the script stops (You clicked the Stop button, you used TerminateScript or the script finished what it was meant to do) it calls the procedure ScriptTerminate;

    In this procedure you could have something like a Debug procedure that tells the user how many logs it has chopped or how many sheeps it has sheared.

    Try running this and you will understand:
    SCAR Code:
    procedure ScriptTerminate;
    begin
      WriteLn('The script has stopped.');
    end;

    begin
    end.

  6. #6
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    What Nava2 is trying to explain to you is that when the script stops (You clicked the Stop button, you used TerminateScript or the script finished what it was meant to do) it calls the procedure ScriptTerminate;

    In this procedure you could have something like a Debug procedure that tells the user how many logs it has chopped or how many sheeps it has sheared.

    Try running this and you will understand:
    SCAR Code:
    procedure ScriptTerminate;
    begin
      WriteLn('The script has stopped.');
    end;

    begin
    end.
    And when you get into proggress reports, which is pretty much just a procedure and a whole bunch of writeln's, it isn't uncommon to see something like this,

    SCAR Code:
    procedure ProgressReport;
    begin
      WriteLn('---Report---');
      WriteLn('---Report---');
      WriteLn('---Report---');
      WriteLn('---Report---');
    end;

    procedure ScriptTerminate;
    begin
      ProgressReport;
    end;

    begin
      --stuff--
    end.

    This will send a progress report when ever the script is stopped, manually or called. Very useful imo..
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  7. #7
    Join Date
    Jan 2008
    Location
    Houston, Texas, USA
    Posts
    770
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bionicle1800 View Post
    And when you get into proggress reports, which is pretty much just a procedure and a whole bunch of writeln's, it isn't uncommon to see something like this,

    SCAR Code:
    procedure ProgressReport;
    begin
      WriteLn('---Report---');
      WriteLn('---Report---');
      WriteLn('---Report---');
      WriteLn('---Report---');
    end;

    procedure ScriptTerminate;
    begin
      ProgressReport;
    end;

    begin
      --stuff--
    end.

    This will send a progress report when ever the script is stopped, manually or called. Very useful imo..
    Thanks for that xD Very useful indeed. I would rep you but I must spread some rep around before giving it to you again

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
  •