Help with string to gameObject.name

I try this:

void OnCollisionEnter(Collision col)

void OnCollisionEnter(Collision col)
    {
        situationjump = (""+gameObject.name ""+col.gameObject.name);
    }

But I get an error

Error 3 Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

It looks like you’re just missing an addition. You can avoid these kinds of errors by using string.Format:

string.Format("{0}{1}", gameObject.name, col.gameObject.name);

You are missing a + after gameObject.name:

void OnCollisionEnter(Collision col)
{
    situationjump = ("" + gameObject.name + "" + col.gameObject.name);
}