# Error calling another class? [closed]

I get the following error every time I run the code: error: error CS0119: Expression denotes a type', where a variable', value' or method group' was expected

void OnCollisionEnter()
{
Stick ();
}


Can someone offer a solution?

• In addition to being a question about debugging your code (which is generally off-topic here, this is also a general programming question which is more suitable for SO. – user1430 Oct 27 '15 at 19:28
• Apart from that, remember that we are not wizards and without context we are unable to pinpoint what is the exact cause of that error, There are a myriad of reasons why a piece of code might fail. – rlam12 Oct 27 '15 at 21:18

Well, it says that Stick is actually a type (a class for example), but you treating it as if it was a method. What is Stick and what did you intend to do with it?
UPD: As far as I understand, you're trying to make a MonoBehaviour to stick to whatever it touches using a method. It seems like there is already a class called Stick which interferes with your code. Calling this.Stick () might solve the issue.