Referencing the thing inside the container

As always, i hereby solemnly swear that i have exhausted the documentation, past posts, and my own attempts at making this work before posting. :slight_smile:

i have an Atari 2600. It has a carrying capacity of 1. If you try to put anything other than a cartridge inside it, you get shut down.

Here’s where i get shut down:

Instead of examining the Atari: if the Atari is not empty: let C be the cartridge inside the Atari; [Inform says "ERROR! ERROR! BLEEP BLOOP!"] say "[the title of C] is plugged into the cartridge slot."; otherwise: say "The Atari 2600 looks hungry for a game cartridge.";

Have tried many things. Have cried many tears.

The problem is that even though the Atari has a carrying capacity of 1, it’s not impossible that there might be more than one cartridge inside because you could add them there programmatically. Therefore “the cartridge inside the Atari” is ambiguous.

You’ll have to either add “random” to resolve the ambiguity:

let C be a random cartridge inside the Atari;

…or name the cartridge in the condition:

if the Atari contains a cartridge (called C): say "[the title of C] is plugged into the cartridge slot.";

Thank you so much for your help. As with so many obscure IF puzzles, whenever i get an answer here, i think “there’s no way i could have come up with that on my own.”