MV Hiding HP for certain characters in the menu

I'm not experienced in JavaScript but I thought I might be able to accomplish this with it. I'm trying to hide HP in the menu for every character but the first one, currently by putting "this.drawActorHp(actor, x2, y + lineHeight * 1, width2);" in rpg_windows.js inside an if statement like this:
JavaScript:
if (this._actorId = 1) {
    this.drawActorHp(actor, x2, y + lineHeight * 1, width2);
}
There are no changes in the menu, no error message or anything. Is there something simple I'm getting wrong here or is this not possible to do it this way?
Hi,
I don't know anything about hiding HP in windows, but if that is your code it might need an extra "=".

Right now, you are performing an assignment, not performing a comparison.
I've done that so many times 🙁

Try:
JavaScript:
if (this._actorId == 1) {
    this.drawActorHp(actor, x2, y + lineHeight * 1, width2);
}
Hi,
I don't know anything about hiding HP in windows, but if that is your code it might need an extra "=".

Right now, you are performing an assignment, not performing a comparison.
I've done that so many times 🙁

Try:
JavaScript:
if (this._actorId == 1) {
    this.drawActorHp(actor, x2, y + lineHeight * 1, width2);
}
Good to know, thank you!
Added the other = and it hid the HP for all of the characters

Original thread: https://forums.rpgmakerweb.com/threads/hiding-hp-for-certain-characters-in-the-menu.139387/