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 appropriate message in the Message Section to see what the source should be.