source=GetSourceRef();
One of the most common mistakes made in cog programming is to assume that the player is always the source of a message. The source is a message property and depends on the message. Look up the message in the Message section to see what the source should be.