Stopping a script

fronobulax

Developer
Staff member
I have a relay script. I started it and it runs adventures. I wanted to stop it and so pressed the Stop Now button on mafia. It did not stop. It occurs to me that the ability to stop or abort a relay script may have been lost with the recent work but figured I'd ask rather than assume. r14766
 

Veracity

Developer
Staff member
Add a stop() method to the Interpreter which sets an instance variable which is checked at the top of BasicScope (at least).

Somehow, keep track of currently executing Interpreters and call stop() on each when you hit the "Stop Now" button.

This might also fix the oft reported comment from some of our more ... colorful ... posters about how they repeatedly "mash" that button with no joy. I am sure there are one or more bug reports on this.
 

fronobulax

Developer
Staff member
r14794 did not work as well as I hoped. I saw World Peace messages but execution continued. I am pretty sure the script is not aggressively restarting but I can't rule that out.
 

fronobulax

Developer
Staff member
To the extent that two or three attempts constitutes a test, r14857 works as expected. I start a relay script and can now stop it with the Stop Now button.

Thanks.
 
Top