Forum Archive

interpreter error in conditional if ...

Leo

Hello, this simple code:

if x <> 0:
  if colores == 1:
    col = 1
  else:     
    col = 0.1                   
else:     
  if colores == 0.1:
    col = 1.4
  else:
   col = 0.1

give me an indentation error If I don't follow the normal indentation created by the program ... I captured the screen to show you this...

omz

From the screenshot you sent me, it looks like you're mixing tabs and spaces (you can tell from the gray dots that there are spaces, while the rest of the file is indented with tabs).

If your indentation setting is to use 4 spaces, I would recommend to convert the indentation of the file you're editing (from the "wrench" menu, after you've fixed the syntax error).