Missing @RPC attribute error while it is there.

Hi I have the following error:

RPC call failed because the function ‘SendMessage’ in ‘Component’ does not have the RPC attribute. You need to add the RPC attribute in front of the function declaration
UnityEngine.NetworkView:RPC(String, RPCMode, Object)

My function has @RPC before its declaration.
I noticed the error says “Component” instead of the script name, when I remove @RPC in other scripts, the error lists the script name.
What could be wrong here?

function Awake() :void
	networkView.RPC("SendMessage", RPCMode.Others);	

function SendMessage() :void

You cannot name you variable the same as an inbuilt function (SendMessage) - use a different name.