Ask coding questions

← Back to all posts
What is wrong with my code I am getting an error.
DellWithGaming

What is wrong with my code I am getting an error. I am trying to make a code system so any members of my clan enter a code to get the link to the discord. Could you guys fix it and send me it.

Answered by IMayBeMe [earned 5 cycles]
View Answer
Voters
DellWithGaming
Comments
hotnewtop
IMayBeMe

Here is the corrected code:

You had multiple errors in your code. The first error is that a variable can't be named pass as pass is a keyword in python. The next error is that you can't have a condition after an else, so I switched it back to else: from else a != b:. Your last issue is that comparing a string and an int won't work so I cast the input to a int.

DellWithGaming

@TMayBeMe THXS SO MUCH

IMayBeMe

@DellWithGaming no problem