Rotation not in namespace pros

I am integrating some odometry code which a teammate has worked on, and they use pros::Rotation for rotation sensors. When I use this in vscode pros extension, it says “No type named ‘Rotation’ in namespace ‘pros’ clang(typename_nested_not_found)”. I don’t know why this is a problem, since the website i saw online shows that Rotation should be a real thing. There might be a chance that I just made a small mistake that caused this, but I think everything looks good:
Can someone tell me what’s wrong? Thanks!

Rotation does exist, you are correct. This is not an issue with your code or with PROS, this is an issue with clangd. Just because VSCode highlights it with a red squiggle means that it is actually an error, it just means that VSCode THINKS it will cause an error.
If you open up the PROS Integrated Terminal (click Integrated Terminal in the PROS Sidebar) and run the command pros build-compile-commands, it will 1) compile the program and tell you what REAL errors you have and 2) generate a file to assist clangd and VSCode (it isn’t perfect so this doesn’t always work. We are working on a solution for our next extension update).
Let me know if this helps or not.


Thanks for the help! I tried that, though the result is confusing. First of all, it shows [WARNING] with yellow color and under that it has the errors (in red color) that vscode previously pointed out, along with some new errors like “error: ‘rotation_sensor3’ was not declared in this scope”. This comes from the previous code i showed, which initialized the sensors in one file, and that file is included in a main.h header, and then the main.h header is included in the file where the error was found, so I don’t understand why it’s an error. Finally, it has an [ERRORS] tab with red, which I think might be the real errors that stopped the code, because it then said:
make: *** [Makefile:78: bin/output.elf] Error 1
Capturing metadata for PROS Editor…
ERROR - - Failed to make project: Exit Code 2
Error: Failed to build
Sentry is attempting to send 1 pending error messages
Waiting up to 2 seconds
Can you please explain what happened? This is my first time as a vex coder.