Access to another script variable or method in the same gameObject

If I have a scrpit with name: pipi
a method in pipi called: public int pipiIn()
and a variabel defined in pipi called : int pepo
The gameObject name may be: PAPA

How to accesss to the variable and the method from an other script of teh same gameObject?

Although you can find the answer to that question pretty fast with google…

You need to get the Script from the other with GetComponent:
csharp* *gameObject.GetComponent<pipi>().pepo* *

and
csharp*_ <em>*gameObject.GetComponent<pipi>().pipiIn()*</em> _*

I know that GetComponent must be used. But there is any problem to reference teh gameObject.

But now is solved. The problem is that I was calling from a script of of a State Machine Controller…