Illegal mixing of tabs in spaces


#1

I keep getting this error when I try to edit on the computer, followed by line numbers. When I look, I can’t find a visible error. It only seems to do this on the computer with Notepad++, never with something that was coded on my phone.

In fact, it’s the only error I get.


#2

Tabs and spaces* and chose the wrong forum. :confused:


#3

What line does it say the error is on? Are you tabbing or spacing your choices, etc? It’s saying on one line there you’ve used tabs and spaces instead of just one. (Sorry this isn’t super accurate. Can’t describe things well)


#4

Can Notepad++ autotab? It’s not something I’m doing, because I code the same way on the laptop that I do on the phone, and only the laptop produces the error. ALWAYS produces the error.

I just hit enter, then use the spacebar to align the indentions.


#5

Does it say what line it’s on? Go to that line and backspace away till you find the tab and fix the error


#6

Yes, and I’ve tried that. Visually, everything is perfectly aligned.

How is a tab created when I only use enter and space?


#7

Auto-indent is on; can that produce this error?

The error’s preventing a 700-word update.


#8

So you did delete all the spaces and then add them back in?

As for auto-indent: maybe. I don’t use it so,…


#9

@ADNox Yes, it can. I can’t remember exactly where off the top of my head, but there’s a setting to define whether auto-indent is a tab or x number of spaces, you’ll obviously want to change it to the latter.


#10

@CJW

Would this outright fix the problem or would it still require going through and doing it manually?


#11

Can I set auto indent to 0 spaces since I can just spacebar if needed?


#12

If you were doing that wouldn’t you just turn auto indent off?


#13

Isn’t auto-indent the feature that makes it align with the last line when you hit enter?


#14

The errors are all fixed; thanks


#15

Why is this in affairs of the court?


#16

He posted it by accident. This can probably be closed now @CJW


#17

To turn off auto indent with Notepad++, go to Settings > Preferences > MISC > And Untick Auto-Indent.