Parsing Error I can't find..

Hey guys ! I’m new and I’m starting to create my own 2D game .
Until now , I’ve a level , plateforms , bonuses and death zones. But when I finished scripting to makes my death zones (trigger collider) , my bonus script doesn’t work anymore and tells me :Unexpected symbol ‘if’ , or Void is not usable in this situation…
Could you help me ? Thank you very much !

Here is my code :

using UnityEngine;
using System.Collections;

public class herosController : MonoBehaviour {

public float maxSpeed = 10.0f;
public Collider2D ground;

// Use this for initialization
void Start () {

}

// Update is called once per frame

void Update () {
float h = Input.GetAxis (“Horizontal”);
Rigidbody2D rigidbody = GetComponent ();
rigidbody.velocity = new Vector2 (h * maxSpeed, rigidbody.velocity.y);

if (Input.GetButtonDown (“Jump”)) {
rigidbody.velocity = new Vector2 (h * maxSpeed, rigidbody.velocity.y + 7);
}
}

void OnTriggerEnter(Collider2D other)
if(other.gameObject.CompareTag (“Bonus”)) {
other.gameObject.SetActive (false);
}

void OnTriggerEnter2D(Collider2D other) {
if (other.gameObject.CompareTag (“Respawn”)) {
Debug.Log(“Game Over”);
Application.LoadLevel(“Neon dash”);
}
}

}

Your OnTriggerEnter method is missing encapsulating curly braces. Like so:

void OnTriggerEnter(Collider2D other)
{
    if(other.gameObject.CompareTag("Bonus"))
    {
        other.gameObject.SetActive(false);
    }
}

That’ll fix your compiler errors - however, Unity expects the OnTriggerEnter method to receive a Collider object, not a Collider2D, so your method won’t be getting called as you might expect. You already have a OnTriggerEnter2D method receiving a Collider2D parameter defined, so what you probably want to do is merge the 2 to look like this:

void OnTriggerEnter2D(Collider2D other)
{
    if(other.gameObject.CompareTag("Bonus"))
    {
        other.gameObject.SetActive(false);
    }
    else if(other.gameObject.CompareTag("Respawn"))
    {
        Debug.Log("Game Over");
        Application.LoadLevel("Neon dash");
    }
}