func not working properly

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

Any time i enter something into this LineEdit the output label calls the (“help”) if statement even if it does not equal (“help”). It was working properly earlier and i did not change a lot besides adding a color variable for changing the color if it’s invalid/valid.

func _on_devConsole_text_entered(new_text): #ConsoleEntered
enteredCommand = $devConsole.text
consoleOutput.text = ("Invalid Command: " + enteredCommand + ", type 'help 1' for a list of commands!")
consoleOutput.visible = true
consoleOutput.add_color_override("font_color", invalidColor)

if enteredCommand == ("help") or ("help1"): #Help
	consoleOutput.text = (enteredCommand + ": " + helpCmdOutput1)
	consoleOutput.visible = true
	consoleOutput.add_color_override("font_color", validColor)
:bust_in_silhouette: Reply From: Xtremezero

you shouldn’t write :

if enteredCommand == (“help”) or (“help1”): Help

instead you should write this

if enteredCommand == (“help”) or enteredCommand == (“help1”):

because or keyword doesn’t work in programming like it does in english sadly :smiley: