1 as an integer, not boolean
I'm trying to set this int variable to 1 by calling my setPower(int power) method.
Code:
public void setPower(int power) {
this.power = power;
}
Code:
else if
setPower(1);
The compiler is telling me
-Syntax error on token "setPower", delete this token
-Type mismatch: cannot convert from Int to Boolean
Is it seeing 1 as a boolean or an integer? If a boolean...how can I change it to be read as an integer? If it's reading it as an integer...what is the problem? setPower takes an integer argument, which I pass as 1, and then sets it to power. I don't see how something could go wrong in this procedure.