Ask coding questions

← Back to all posts
Syntax error in py
chuckthebuck (0)

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 "", line 18
if console == adduser:
SyntaxError: invalid syntax
Thanks for the help.

Coder100 (18099)

if statements cannot be empty, so add a pass:

if password == (users[passid]):
  print("Wrong password!")

this is line 18-21 btwy

chuckthebuck (0)

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

Coder100 (18099)


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

chuckthebuck (0)

@Coder100 sorry still working on it.