Attention | Topic was automatically imported from the old Question2Answer platform. | |
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)