Please help me with this code unity is giving me errors I don't understand


#1

using UnityEngine;

// using code c sharp

public class Playercollision : MonoBehaviour{

void OnCollisionEnter(Collision collisionInfo);
      {

//error at "{"
if (collisioninfo.colider.tag == "Obstical")
//error at "=="
{

    }

}
      }

//error at "}"


#2

I don't know if this might work, as I have limited knowledge of Unity, but you might not need quotations for obstical. Also, for the if statement, shouldn't it be collisionInfo.tag? Shouldn't the 'i' in info be captitalized?

(I have no idea were the colider is coming from, so you might not need it if you didn't use it.)


#3

none of the suggestions worked but was my bad I did not state where the errors were


#5