Unsuccessful Action creation help

Hi again. I used the ray-gun example as a template for creating an action where you can feed an animal.

This may or may not be an action that already exists, I should be able to accomplish it but apparently I can’t. The idea is that an angry racoon is blocking the way and you feed them to get them to move.

I imagine the most correct input to be “feed candyfloss to raccoon”. I’d probably have to allow “feed racoon with candyfloss as well.”

I’m lost as to the most efficient way to achieve this.

Feeding it to is an action applying to two things.

Check feeding something to something: 
    if the player is not carrying the candyfloss, say "You have no food a raccoon would eat!" instead; 
    if the second noun is not the raccoon, say "[The second noun] is of no interest to a raccoon." instead;
	if the noun is not the raccoon, say "[noun]s are not here." instead;
    if the noun is the candyfloss, say "food can't eat food!" instead; 
    if the noun is the player, say "It looks good but who'd eat food from a train roof!" instead.

Understand "feed [candyfloss] to [something unraccoonlike]" as feeding it to (with nouns reversed).

Definition: a thing is unraccoonlike if it is not the raccoon.

Understand "feed [something unraccoonlike] with [candyfloss]" as feeding it to.

Understand "feed [something] to [something]" as feeding it to (with nouns reversed).

Carry out feeding something to something: 	
    		say "Nom! [The noun] grabs the candyfloss and climbs down the tree! [if something is part of the noun][The list of things which are part of the noun] clatter to the ground! [end if][paragraph break]"; 
    now every thing which is part of the noun is in the location.

After feeding the candyfloss to the raccoon:
	say "The raccoon scampers away.";
	now the raccoon is nowhere.

I’m really not sure what you were trying to do with unracoonlike there, especially since most of the time you do want it to be the raccoon.

But the good news is that feed is actually already defined as synonymous with giving it to, so the easiest way to accomplish what you want is this:

The block giving rule does nothing if the noun is the candyfloss and the second noun is the raccoon.

After giving the candyfloss to the raccoon:
	now the raccoon is nowhere;
	say "Nom!  The raccoon grabs the candyfloss and climbs down the tree![line break]The raccoon scampers away."

This doesn’t include your custom rejection Check messages, but most of those aren’t needed as they’re already covered by the standard rules. It’s possible to add some of them back if you want to have a custom message for this particular situation; for best results though you should write them as individual specific rules, e.g:

Check giving something to the raccoon when the noun is not the candyfloss:
	say "The raccoon sniffs disdainfully at [the noun] before growling slightly and glaring at you." instead.

I’m sort of new to inform7’s coding system, but, that looks like it should work, then again, I’m not sure.