Help with Python code

Help. I’m getting a problem with my VEX code school project.
“IndentationError: unindent does not match any outer indentation level”
Screenshot 2021-12-07 11.33.11 AM

What I want to happen is, when Button X one set of my bots arms lock, and of I press Button B, the other arms lock. My teacher is a java programmer, so she couldn’t help me with python.

Hi Buff Crab.

Is that VEXcode, or Robot Mesh Studio?

Cheers, Sam

2 Likes

Are lines 125 and 128 indented with a tab or with spaces? Make sure you stick with one or the other (and everywhere else in your program too.) Python is very picky about indentation.

2 Likes

Yes, this seemed to have worked. I thought that there were only spaces and tabs, but after you mentioned python’s disdain for interchanging these, I found that there was a third type of space, only accessible through manipulating the enter button. Tab and this third type of space were the ones that broke the code. Thank you for your help.

In Options, please set the privacy level of your project to Public, Including Code and then post a link to the project.

image