You cannot do comparisons like that. Each comparison must be separate.
Something like:
(PR_value > 60 && PR_value <= 70)
Same with the other, similar, if structures.
= for assignment, == for comparison. See the warning in the if structure reference.
Beware of accidentally using the single equal sign (e.g.
if (x = 10)
). The single equal sign is the assignment operator, and setsx
to 10 (puts the value 10 into the variablex
). Instead use the double equal sign (e.g.if (x == 10)
), which is the comparison operator, and tests whetherx
is equal to 10 or not. The latter statement is only true ifx
equals 10, but the former statement will always be true.
That extra semicolon may mess things up. Be careful with your syntax, an if structure should not end with a semicolon.
Read the forum guidelines.
Use the IDE autoformat tool (ctrl-t or Tools, Auto Format) to indent the code for readability before posting code.
Post your code in code tags.