Results 1 to 8 of 8

Thread: Script Terminate

  1. #1
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default Script Terminate

    I read one of Naum's tutorials about Script Terminate in SCAR. I was just wondering if it exactly the same in SIMBA too?

    Thanks
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Is this what you're referring to?
    Simba Code:
    AddOnTerminate('Report');
    This will call the 'Report' function when the script is manually terminated. This goes in where the main script begins, but before the repeated 'loop' is called.

  3. #3
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    That's a good tactic thanks. Do you put the procedure in parenthesis?

    I'm referring to this thread: http://villavu.com/forum/showthread.php?t=41832
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  4. #4
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Simba Code:
    program new;
    {$i SRL/SRL.scar}

    procedure Report;
    begin
      writeln('What ever procedure you want.');
    end;

    begin
    AddOnTerminate('Report'); // procedure name goes where Report is

    repeat
     wait(100);
    until IsFKeyDown(7);
    end.

    does that make sense? if you need help pm me



  5. #5
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Yeah I get it now. Thanks.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  6. #6
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Sorry for bringing this up again... but does addonterminate support procedures with parameters because i am getting errors with it once i added a boolean parameter.

    Getting this error: Exception in Script: Unknown procedure

    Heres my code:

    Simba Code:
    AddOnTerminate('Report(True)');

    I dont see anything wrong with it
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

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

    Default

    No, it does not.

    Unfortunately, you need to write a wrapper procedure that will call your parameters. Then, pass this new procedure to the AddOnTerminate.
    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

  8. #8
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    OK. Thanks.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

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
  •