Feature Clear command queue

lvlarx

New member
Having recently run into trouble several times with gCLI commands not being cleared when aborting automation, I would like to request a command to clear the command queue. It seems like this was asked before, but later unimplemented? At any rate, hitting abort no longer clears the queue, which gave me problems most recently when trying to sewer with the new closet update.

Thanks!
 

Veracity

Developer
Staff member
Yeah....we'll implement a command that you can type that will be queued onto the command queue, like all other commands. That's the ticket! :)

(How do you "abort automation" in a way which does not clear the queue? That sounds like the real issue...)
 

Theraze

Active member
Sometimes, in a non-repeatable way, when trying to abort automation (generally pressing Escape), automation continues. I'll hit escape, run another gCLI command, and it will stack onto the queue. I hit escape a few more times, gCLI keeps marking that the world should be stopping... and as I try to run whatever script, it keeps stacking up on the queue... Eventually, if I keep trying (or restart mafia fully) the queue will go away, and I can run whatever I wanted.

But until it's repeatable in a useful way, I won't try to waste your (Veracity's) time. Just wanted to say that I've noted this as well. I'm using Windows 7 64-bit, if it matters.
 
Yeah....we'll implement a command that you can type that will be queued onto the command queue, like all other commands. That's the ticket! :)

(How do you "abort automation" in a way which does not clear the queue? That sounds like the real issue...)

Well, as for the first, the command "abort" doesn't just get queued, it does its job immediately. I don't see why a Super Abort couldn't do similarly.

As for the second question, I'm not sure what you're asking. Abort, in my experience, doesn't clear the queue. At least not since try-finally came into the picture. I abort a script, its finally clause catches, and then whatever's next in line gets executed as if the first had finished of its own accord.
 

Bale

Minion
As for the second question, I'm not sure what you're asking. Abort, in my experience, doesn't clear the queue. At least not since try-finally came into the picture. I abort a script, its finally clause catches, and then whatever's next in line gets executed as if the first had finished of its own accord.

That's entirely different from the CLI queue. Also, if that isn't the preferred behavior then it is the responsibility of a script writer to account for possible intentional aborts.
 
That's entirely different from the CLI queue. Also, if that isn't the preferred behavior then it is the responsibility of a script writer to account for possible intentional aborts.

Perhaps I was unclear. After the finally is executed, and the script reaches closure, the next item in the CLI queue begins execution.
 

fronobulax

Developer
Staff member
I don't especially trust my memory. But there have been cases where I have queued up scripts and seen that they are queued via gCLI messages. I have then realized there was a problem and pressed the "stop now" button on the Adventure tab. The currently executing script stops but the gCLI indicates that the next script in the queue has started. I then stop it by the same button press and usually succeed.
 

Winterbay

Active member
I tend to not trust the stop now functionality at all times. It sometimes appears to be continuing with the same script or another queued command after a click. I tent to hold down Esc for a few seconds to be sure that everything is stopped completely which screws up the tabbed chat :)
 

Ferdawoon

Member
I've had similar experiences, but not so much the way the OT describe it.
I have had experiences more in the line of what Winterbay mention where a bad loop, ususally of the infinite kind, in a script somewhere make Mafia sad. I then press Stop Now but the loop still keep on going. Spamming Stop Now fix it ususally but I have seen times when closing Mafia was the only way to make the gCLI stop flooding the same message that the loop is giving :S

EDIT:
Found a case where this happens. I just remembered to log my multi and forgot about the Hermit problem during breakfast, and I tried to abort the whole thing.
3 times pressing Stop Now did not stop Breakfast. Maybe that is a feature though, I dunno.

Code:
Robbing the hermit...
Visiting Potted Meat Tree in clan rumpus room
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Placing items into closet...
Robbing the hermit...
Robbing the hermit...
Transfer failed for worthless trinket
Robbing the hermit...
Using 3 chewing gum on a string...
Robbing the hermit...
You acquire an item: worthless knick-knack
You acquire an item: Hollandaise helmet
You acquire an item: worthless gewgaw
Robbing the hermit...
Finished using 3 chewing gum on a string.
Unable to acquire 4 worthless items.
KoLmafia declares world peace.
KoLmafia declares world peace.
KoLmafia declares world peace.
Collecting cut of hippy profits...
Robbing the hermit...
Robbing the hermit...
You gain 4,517 Meat
Robbing the hermit...
Casting Advanced Cocktailcrafting 3 times...
Robbing the hermit...
You acquire an item: magical ice cubes
You acquire an item: little paper umbrella
You acquire an item: coconut shell
Advanced Cocktailcrafting was successfully cast.
Robbing the hermit...
Casting Advanced Saucecrafting 5 times...
Robbing the hermit...
You acquire scrumptious reagent (5)
Advanced Saucecrafting was successfully cast.
Robbing the hermit...
Casting Pastamastery 3 times...
You acquire dry noodles (3)
Pastamastery was successfully cast.
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
Robbing the hermit...
 
Last edited:

roippi

Developer
No, that commit only affects relay scripts. This is about the CLI queue.

What sort of CLI command ignores world peace being declared (aka continuationState)? I see a bunch of hand-wavy reports of various things in this thread, but nothing concrete. Give me an actual CLI command or ASH script that, when run through the CLI and world peace is declared, behaves erroneously. Because as far as I can tell, setting mafia to an ABORT state very quickly clears all of the things I've tried to queue out of the CLI handler.
 

xKiv

Active member
Is this about what I experience in times of heavy lag [1], when I queue some commands that just don't want to finish, and no matter what I do (ESC ESC ESC, graygui force), they stay in the queue and never finish, preventing me from doing anything that goes through the queue?

[1] like perhaps this (twitch) weekend, or even worse case around almost every midnight (GMT+2) since
 
Top