jeudi 21 janvier 2016

Unity error CS0029: Cannot implicitly convert type `bool' to `int' but it's bool

I have error

CS0029: Cannot implicitly convert type bool to int.

My declaration:

public bool isBig = false;

If statement with error:

if (player.GetHP() < 6 && player.isBig == false)

I don't understand this. I have also change this bool to return and checked few solutions:

player.GetBig() == false/0 / (player.GetBig()) == false/0 / !(player.GetBig()) 

but nothing works...

Aucun commentaire:

Enregistrer un commentaire