Some help please with "Instead"

As a huge fan of IF (played it a lot as a child), I was excited to download Inform 7 yesterday. I had to download one of the previous builds because I have 10.5.8, and couldn’t get it to work (but thanks to the kind folks here I found out how to make it work). I’m not sure if that’s relevant to the problem I have, but I’ll share it just in case.

Okay, so I do a lot of things that require “putting something in something else”. For instance, an egg. However, because the egg is a container (due to the necessity of hiding a red key in it), when you try to put the egg into the egg carton and mistype it, you can end up putting the egg carton in the egg. Which is obviously less than ideal.

So, I have

[code]An egg carton is a closed openable container. Understand “box”, “carton” as the egg carton. Inside the egg carton are 11 eggs.

Instead of putting something inside the egg, say “You can’t put the carton in the egg”[/code]

But Inform doesn’t seem to like it. I’ve tried saying “putting something in the egg, putting something into the egg” etc. The only thing that seems to go through the parser okay is putting something on the egg, but that obviously doesn’t catch someone putting the egg carton into the egg, as I did when I mistyped it in testing.

Please help me figure out the “Instead of putting something into” issue? I’ve needed to use it a few times and I’ve found workarounds for other things, but this one is making me a little bit insane.

Thank you in advance, you guys are great and I’ve learned a ton already!

oh, it’s “inserting… into…” not “putting … in …”. Check the Actions tab of the Index for the official names of actions.

Thank you!

I swear I tried that, but perhaps I said “in” instead of “into” or something silly like that - you know how it gets when you’re trying things multiple ways :slight_smile: Glad it was a simple problem! I’m sure I’ll come up with more complex ones as I get further into this. :slight_smile:

Just as a quick style point – and you may already have this covered and just posted a simplified version here, but I figure it can’t hurt to point it out – you probably don’t want a response to be more specific than the rule triggering it. So for example, Instead of inserting something into the egg, say "You can't put the carton in the egg." could lead to an exchange like:

>put key in egg [if a player for some reason thought they should put it back in] You can't put the carton in the egg.
which is obviously not quite the right response. You should probably either have (the more general)

 Instead of inserting something (called the inserted-object) into the egg, say "You can't put [the inserted object] in the egg."
[/code] or (the more specific) [code]
 Instead of inserting the egg carton into the egg, say "You can't put the carton in the egg."

You guys are the best, thank you! That really helps me in my journey to figure out what’s what.

What’s really interesting is that writing it is just as fun as playing it…it requires the same type of thought, exploration and adventure.

Thanks again!