Having issue with the if clause

every time I start debugging this shows up as a problem- if clause does not guard wmisleading indentation

The screen shows up with the dot but I can’t move it using the keys I looked online and it mentioned a spacing issue but nothing changed even when I completly re did that section.

Think of the if-statement like a function call, so you want to make sure there’s no space between “if” and the parentheses containing the expression it’s testing. While it doesn’t throw an error the same goes for the while-loop as well.

Don’t forget to save your cpp file and compile before testing again.

PS - you do the same thing for IsKeyDown


I tried removing the space between the if and parenthesis but I am still having the same issue.


Ignore what I just said I reliased that I had put a semicolon in the if section of the code by mistake and it works fine now. Thanks for the help.

You’re welcome! Sorry I missed that error at first glance.

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

Privacy & Terms