Differentiating between carried things and parts of player

How can I have conditional text display only if the player is holding something that isn’t a part of the player?

I’ve tried:

if the player encloses a thing which is not a part of the player, say "You are carrying things that aren't a part of you."; andDefinition: A thing is unpartified if it is not a part of the player. ... if the player encloses a unpartified thing, say "You are carrying things that aren't a part of you.";
Both compile, neither work. Also, is there a neater way of dealing with carried things? At the moment I’m using this to move inventory items:Definition: A thing is unpartified if it is not a part of the player. ... now every unpartified thing enclosed by the player is in the location of the player;Which works, but seems clumsy.

Any advice appreciated! Thanks.

Your first two examples work fine for me.

Ack! I had my code in an after rule. Changed it to an instead of rule, and it works fine. This will sink in eventually, I promise! Thanks for the help.

Can’t you just type “every thing carried by the player”?

Question: What happens if the player is holding a closed container, and has an object in that container? Your code, IIUC, will move the contained object out. Do you want that behavior?