is tab indent bad ?

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

Does tab indent cause problems?
i get “Unindent does not match any outer indentation level” error.

https://i.imgur.com/35RN5wC.jpg

extends Node2D

var speed = 100
var vel = Vector2()

func _ready():
    set_process(true)

func _process(delta):
    vel = Vector2()
	if Input.is_key_pressed(KEY_RIGHT):
		vel = Vector2(speed, 0) 
	if Input.is_key_pressed(KEY_LEFT):
		vel = Vector2(speed, 0)
    translate(vel * delta)

Converting to space indent solved the problem.
However, space indents are not good looking.
Is there a way to solve it?
https://forum.godotengine.org/28306/error-unindent-does-not-match-any-outer-indentation-level
i try this tutorial, but problem is can not solved

:bust_in_silhouette: Reply From: wombatstampede

No Tab indenting is not bad.
Just don’t mix space and tab indenting in one block like you did in the screen shot.

Your error:
vel = was indented with spaces and the next line(s) were indented with tabs.

Generally set your indenting in Editor->Preferences then “Text Editor->Indent”.

Problems usually arise if you copy text from other sources which used the “other” editing and then edit it using your own preferences. Or if you use an exeternal editor with different indenting settings.

Thank you!
I had overlooked space indent

bgegg | 2019-03-28 22:23