// this line is wrong
GameObject.Find("__GameMaster").GetComponent(Score).score)SendMessage("SetScore"), spentAmount);
// not sure why are you getting the score, but this should work.
GameObject.Find("__GameMaster").SendMessage("SetScore", spentAmount);
↧