View Full Version : 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
Flight
03-03-2011, 12:36 AM
Is this what you're referring to?
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.
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
Bonfield
03-04-2011, 02:21 AM
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
Yeah I get it now. Thanks.
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:
AddOnTerminate('Report(True)');
I dont see anything wrong with it
Nava2
03-21-2011, 03:37 AM
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.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.