
Originally Posted by
Zyt3x
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..