Iterating through 'all' (adv3Lite)

I was having a similar problem a few months ago, and I thought it had been solved (though by now I don’t remember the details; it may have been something about going through doors). And now it’s back. ‘put all in bag’ is iterating through the list of things that can’t be put in the bag, and it’s doing it twice. Here’s the output (with minor spoilers:

>put all in bag The poor guy has little enough as it is. The poor guy has little enough as it is. (first taking two pairs of shoes then taking two forked sticks)

There’s only one pair of shoes and one forked stick. Beyond that, the refusal message is being printed before the implicit ‘take’ is attempted.

I can tidy it up a bit by adding an abort after the message:

cannotTakeFromActorMsg(obj) {
    "The poor guy has little enough as it is. ";
    abort;
}

This works, but now the player sees no indication that the rest of the stuff that’s available is being successfully put in the bag. It ends up in the bag, but the game doesn’t say so.

Oh, well. I guess that makes it a minor problem.

1 Like