Confusion while attacking inanimate object

So, I’m playing around with Example 293 Lanista 2 in an attempt to create a one-on-one combat with additional props. In this case there are a few extra weapons lying around the player can pick up, and a few corpses from previous combats.

The only significant change I made to the example is:

The Green Knight is a thing in the Arena. "The twisted and mangled remains of a knight in green armor."

In the example there’s the following rule:

Check an actor attacking something with something (this is the can't attack a non-person rule): 
    if the noun is not a person: 
        if the actor is the player, say "[The noun] has no life to lose."; 
        stop the action. 

I expected this rule to be triggered if the player decides to attack a corpse, but this rule is never reached. You get:

Using ACTIONS and RULES provides absolutely nothing – no rules are listed, and no actions are listed. The response is listed in the standard rules in Section SR2/14 - Command parser errors.

I have tried:

Before attacking something:
	if the noun is not a person:
		if the actor is the player, say "[The noun] has no life to lose.";
		stop the action.
		
Instead of attacking something when the noun is not a person, say "[The noun] has no life to lose."

Neither has any effect.

How can I fix this?

This is happening because of this code:

Attacking it with is an action applying to one visible thing and one carried thing. Understand "attack [someone] with [something preferably held]" as attacking it with.

The parser will only accept ATTACK X WITH Y if X is [someone]. Otherwise you get a parser-generated error before the check rule is ever consulted. You can alter this by changing [someone] to [something].

I suspect this line from the example is the cause:

Understand "attack [someone] with [something preferably held]" as attacking it with.

The parser is probably seeing that the token is [someone] and thus printing an error message if you attempt it on something that doesn’t match that token - anything that’s not a person.

You could either change the token to [something] or revise your addition to make the Green Knight a person. Of course, changing him to a person would probably require additional changes, too.

Thanks Vince, that makes perfect sense.

Yes, changing the token to [something] means you have additional rules to handle other un-attackable things like scenery. Unless you’re okay with:

Making the corpse a person isn’t any easier because you then have to modify the attacking it with rules to respond differently if the noun is dead. And you also have the problem of:

I solved that with something like “the can’t take other people rule does nothing when the noun is dead”… or maybe it was “can’t take other people’s possessions rule”. Regardless, the point is that both ways can be made to work.