Ask coding questions

← Back to all posts
Syntax error in py
h
chuckthebuck

So the code is a basic login system with the ability to add users (declared the variables, an old habit from c++)
The error message is
File "main.py", line 18
if console == adduser:
^
SyntaxError: invalid syntax
Thanks for the help.

Comments
hotnewtop
Coder100

if statements cannot be empty, so add a pass:

this is line 18-21 btwy

chuckthebuck

@Coder100 thanks

chuckthebuck

@Coder100 I'm getting inconsistent use of tabs and spaces.
any idea what's up? (it's line 23)

Coder100

@chuckthebuck

you never finished your else statement, please finish your code first

chuckthebuck

@Coder100 sorry still working on it.