You have
public float canShoot = true;
. So you've declared a member variable to be of type floating point, but then try to assign a boolean value (i.e.
true
) to it, which makes no sense. It's like declaring a member of type 'color' and then trying to assign a value of "Turing" to it (unless in your world "Turing" is a color...). Changing the type of canShoot from
float
to
bool
should fix
both the compiler errors you have listed here.