I am getting this error. Can somebody can help me ?
Did you make a IncrementScore?
to less to be serious here.
because Script is āmonoā
so you do an Assignment ( sorry me german ) that is not define here.
āIncrementScoreā = i think an other Script, no Define here ( i only noob in this cases, but
i think, you use a not defined value )
ScoreKeeper scoreKeep = FindObjectOfTypey(); ā seems to be okay.
Scorekeeper.IncrementScore(scorePerHit); ā is not okay.
just watch your Public Classes.
There is only Definition for "public int scorePerHit = 1;
there is inside MomoBehaviour no Parameter called: āIncrementScoreā
So in my Opinion:
you need :
Class DetectScorcing : ?? ( maybe ScoreKeeper? - not MonoBeheaver ? )
or you have a Argument that not can be intapolated, like: āincrementScoreā this is not known
in this MonoBehaviour ( i am sorry, i am new at this, if i do some mistakes, please tell me.
i am not āprofiā in this Case, but i think, this can be the Mistake.
Hi the reason why you get this error itās because you are searching the method of the class ScoreKeeper instead of the instance scoreKeep.
You have just to change ScoreKeeper.IncrementScore to scoreKeep.IncrementScore
Thank you TheNightFlier and SimonSP. Its working now. Its kinda silly error. Anyways thank you for looking into it.
Donāt worry.
When you donāt want what to do ask in the community.