How to fix this "MissingMethodException"

I got 2 Scripts (one on my player GameObject and one on a shoppingNPC GameObject).
I have the same class to store some properties declared in bot scripts:

[System.Serializable]
public class Item{
    public string name;
    public int costs;
    public float _value;
    public string itemClass;
    public int slotNumber;
    public Texture2D texture;
}

In my “Inventory” script (the one on the player) i have a function to buy an item which takes “Item _item” as a paramater. I want to call this function from the other script via “SendMessage”.

This is the function in the inventory script:

void BuyItem(Item _item){
		if(_item.costs < rubyAmount){
			
		}
		else{
			infoText.SendMessage("ShowText", "I need more Rubys...");
		}
	}

This is the function with the SendMessage:

	void OnGUI(){
		if(shopActive){
			GUI.skin = shopSkin;
			GUI.BeginGroup(menuAreaNormalized);
			int buttonNumber = 0;
			
			for(int i = 0; i < _itemClass.Length; i++){
				for(int k = 0; k < _itemClass*.buyableItem.Length; k++){*

if(itemClass*.buyableItem[k].buyable){
if(GUI.Button(new Rect(firstButton.x,firstButton.y + 48 * buttonNumber, firstButton.width, firstButton.height), _itemClass.buyableItem[k].itemGUI)){*

* Debug.Log("Classnummer: " + i.ToString() + “; Itemnummer: " + k.ToString() + " pressed”);_
player.SendMessage(“BuyItem”, _itemClass.buyableItem[k].item);*
* }
buttonNumber++;
}
}
}
GUI.EndGroup();
}
}_

itemClass is an class storing the className and the item to buy. buyableItem is a class which stores all information needed to buy the item in the shop including the item of type “Item” (the class from the beginning).*
I can’t find an error but if I click on an item in the shop it says “MissingMethodException: The best match for method has some invalid parameter.”

Anyone can help me?

This error means that you’re calling a function with the wrong type or number of arguments. Take a look at the line where the error occurs and check the function calls to find which one has an incompatible argument.