Why is VS Code complainign about this line?

whatstheproblem

When I run it as typed, everything works. Once I jump by pressing space, I can not do a mid air double jump. Everything works as expected. But VS Code continues to complain about this line saying “expression must be a modifiable value” and “lvalue required as left operand of assignment”. Sometimes I think VS Code throws up errors that aren’t really a problem. If I type it exactly as Stephen did using “!isInAir” to invert the logic, VS Code doesn’t show an error.

EDITED TO ADD:
It’s a syntax problem. I’m using = instead of ==

For further context.

X = Y is an assignment using the assignment operator =, so instead of comparing the values (which is what == would do) we’re instead assigning the value of Y to X.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms