Unindent does not match any outer. Dodge the Creeps

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jose Romero

Latin user, if you can answer in Spanish, I would appreciate it.
Usuario latino, si puede responder en español, se lo agradeceria.
I’m following the tutorial of the latest version, so this should go well, but no, I’m new, and I’ve had problems with the indents, I can not find detailed information or examples of how I should use them correctly, so I downloaded the project already finished that provides the documentation page, I compared, there was not much difference, to confirm, I copied and I pasted the final code, and even so, it still gives me error.
If I try, for example, to change the indent, eliminating a >> before $ AnimatedSprite.play () — Line 21 — I get the error: Parsing expression, mispaced: else, that no idea what I mean.
To be new and to fail in something that should be simple is a headache, help me please.

image 1

image 2

Edited your post to see the links, google does not seem to like direct linking

eons | 2018-08-12 16:19

:bust_in_silhouette: Reply From: eons

As you can see, the indentations are wrong, one tab == one space, and there are lines with many mixed tabs and spaces.

Fix the indentation, use tabs only.

And the line with the error is closing the previous if (lower indent) so the else is wrong.

Como puedes ver, la indentación está mal, un tab == un espacio, y hay líneas que mezclan varios tabs y espacios.

Arregla la indentación, usa tabs solamente.

Y la línea con el error está cerrando el bloque del if anterior (la indentación es menor) así que el else está mal ubicado para el intérprete.

Expanding on this for others who might be searching for this problem: it is legal to use tabs or spaces, you just have to be consistent. I personally don’t like tabs, so I went to the Editor menu, Editor Settings, Indent, and changed Type to Spaces. If you have a mix in a file and you need to convert them, under the Edit menu you can find “Convert Indent to Spaces” (or Tabs).

jasonlapier | 2018-11-27 08:25