 |
tahnar Beginner
Joined: 21 Mar 2007 Posts: 14
|
Posted: Fri Mar 23, 2007 8:54 pm
Full Abort |
I cannot seem to make proper use of the #ABORT command or "Stop further processing" flag. While moving around in this game, occasionally an event will happen which will instantly move me to another (random) location. If this happens while running a movement script (which is usually when it does happen) it can be extremely dangerous - there are a few instantly fatal locations about. So I set up a trigger with the intent to catch the text of the event and when it happens stop all scripting currently in progress.
The trigger is firing correctly (because the coloring of the text and alert beeps are going off), but the "Stop further processing" flag seems to have no impact, possibly because the other triggers have already fired (a script is in progress). If I add #ABORT to the trigger, it does abort - but only commands contained inside the trigger, which is not useful, even using #ABORT 1, which is supposed to terminate all active scripts.
Some advice would be well-appreciated before my character's insurance goes through the roof. :) |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Mar 23, 2007 9:47 pm |
#ABORT 1 does not, and actually as best I know never has, stopped all active scripts. It only stops the one containing the #ABORT 1.
#ABORT 1 -- ends the trigger
#ABORT 0 -- ends the loop in the trigger |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
tahnar Beginner
Joined: 21 Mar 2007 Posts: 14
|
Posted: Sat Mar 24, 2007 1:07 am |
Just going by the documentation:
Quote: |
#ABORT
Syntax: #AB flag
Aborts further parsing of the current command line. Commands after this on the same line are discarded. Aborts processing of current program block.
If the flag is present and non-zero, all active scripts are aborted instead of just the current program block. |
(emphasis mine) |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Mar 24, 2007 3:42 am |
Hmm, I stand corrected (and apparently discovered another, unrelated bug). #ABORT and #ABORT 1 produced the same effect (that is, the last #say never fires). Furthermore, the exact same thing happens when I run this alias when a long-iteration loop is in play (that is, both #ABORT and #ABORT 1 stop the loop in the exact same way.)
#alias Test {
#say this is code-block 1
#if (%1) {
#say using abort
#abort
} {
#say using abort 1
#abort 1
}
#say abort has fired
}
Looks like a bug, I guess. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
|
|