Error in supposedly correct script

Hey there,

I am following a tutorial by a youtuber called Jimmy Vegas, and I stumbled across this error (see the image I uploaded)

Here is the script, what am I doing wrong?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HealthMonitor : MonoBehaviour {

public static int HealthValue;
public int InternalHealth;
public GameObject Heart1;
public GameObject Heart2;
public GameObject Heart3;

void Start () {

}

void Update () {
InternalHealth = HealthValue;

if (HealthValue) == 1) {
Heart1.SetActive (true);

if (HealthValue) == 2) {
Heart2.SetActive (true);

if (HealthValue) == 3) {
Heart3.SetActive (true);
}
}
}
}
}

Something ate some openning braces “if (HealthValue) == 1) {” needs to be “if ((HealthValue) == 1) {” or “if (HealthValue == 1) {”

Formatted.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HealthMonitor : MonoBehaviour {

    public static int HealthValue;
    public int InternalHealth;
    public GameObject Heart1;
    public GameObject Heart2;
    public GameObject Heart3;


    void Start () {

    }

    void Update () {
        InternalHealth = HealthValue;

        if (HealthValue == 1) {
            Heart1.SetActive (true);
        }

        if (HealthValue == 2) {
            Heart2.SetActive (true);
        }

        if (HealthValue == 3) {
            Heart3.SetActive (true);
        }
    }
}

Please do use code tags, makes things so much easier to read.

This is not correct:

if (HealthValue) == 1)

For every opening “(” you must have a closing “)”.

Ok. Thanks!