| BlackJayce (4) | |||
|
Help!!! Here what I want to do: a simple game where a player is given the choice of two buttons to click, if he clicks them in the correct order he wins. the current correct combination is (right, left, right) If he does not find the right order, the game continues until he does. I get the error "Expression must be a modifiable lvalue" and it fails to compile.
| |||
|
|
|||
| kameswarib (24) | ||
Typo at line
game1[2] = 1 is assignment game1[2] == 1 is checking the value (Most experienced programmers also make this common mistake of using = instead of ==. Better to make habit of using <constant value> == <variable name> instead of <variable name> == <constant value>. This way we can catch errors during compile time. ) | ||
|
Last edited on
|
||