What do I do to fix this error?

I just wrote this code and then pressed build and these errors popped up. I wrote it correctly and registered the motor but its being weird. How could I fix this?

Thanks.

I think you would need to put the code in a function for it to work

1 Like

Its all under int main()

If so then why is there a return(0); above it

2 Likes

thats for another code. unrelated

Why don’t you share the entire program here so that we can see if it really is unrelated. Programming can often have weird relationships between things that you would think are unrelated.

Also, did you double check that your motor is actually named RollerMotor? Spelling and case does matter.

3 Likes

yes it is spelt that way. ill take a screenshot of it all rn

It is definitely not contained in int main. You should put the lines with the error inside your driver control.

1 Like

I found that if I remove the return 0 and the bracket below it, and add a bracket at the very end of the code, that the error will go away. I guess the error was that the return 0 was ending the int main

1 Like

The roller code won’t work unless it is inside of a while(true) inside of driver control

1 Like

Whenever I try to update my vex kit, it keeps getting stuck on this screen.