I have no idea what I am doing wrong.
You commented out vex.h
thanks but why are the other two highlighted
“vex” is highlighted because… you commented out vex.h
x_pos is highlighted because you cannot put the function “vexcodeInit” inside the function “main”
I find this problem with my code
I tried to fix it by adding { at the beginning and } at the end of the code and it gave me all these errors with other {
You have a code structure issue. You keep putting code inside main that should be elsewhere. There’s also no need to keep creating new topics, it would also be better to post the code (inside code tags) rather than screen shots, that allows members to post corrections.
It might help to give a file if you are willing to. We can send you back a fixed version.
Well, you just posted a VEXcode python project that looks like a converted blocks project (which is generally not clear and easy to read code, good as a starting point but usually should be rewritten). Previously you were using C++ in VEXcode V5 Pro.
You seem to way out of your depth here, it may be best to stick with VEXcode for the time being and not try to transition to VEXcode V5 Pro (especially as Pro is being sunsetted, new projects should really be using the VEX VSCode extension).
From your original post, it looks like you only have a single C++ source file that’s relevant. Just open main.cpp in the src folder and copy the contents into a post between code tags so it looks like this in the preview pane.
// example of how code should look when added to a post
int main() {
}
The v5code file you were trying to add has no source code, it’s just the project control file.