I’d like to have a command that a player can say “Throw away [something]” or “Throw [something] away” to equate out to “Put [the noun] in the trashcan.” The trashcan is already a container in the room. The something or noun is anything that the person would be carrying.
I figured there’d already be something out there that already defines this; but I can’t find it nor figure it out on my own.
Understand "throw away [something]" as trashing.
Understand "throw [something] away" as trashing.
Trashing is an action applying to one carried thing.
Carry out trashing:
try inserting the noun into the trash can.
Your complete “carry out” will need more than that eventually – this code doesn’t account for the fact that the player might not be near the trash can, for example.
Ah, I’ve run into this too – I think the issue is that you used “it” as part of defining your action, which I believe Inform only allows for actions that apply to two nouns (like “inserting it into” or “putting it on”). The documentation isn’t really clear on this unfortunately.