Ask coding questions

← Back to all posts
Why does this program have a problem
madmonster (15)

For some random reason, line 16 doesn't work (could be multiple lines of code with the same problem) and I have proof-readed it to my best shot and it had an error image saying that the syntax is incorrect even though the program looked as if it is completely errorproof. Please help!

themaka (183)

The others have already answered, but just to make sure it's clear. Using a single equal sign means you are setting a value.
x = 5

When you want to compare, like in an if statement, you have to use two equal signs
if x == 5:
#do something

AzureScripts (164)

You did it wrong!

You need to have 2 equal signs (==) when you are doing 'if' stuff

if thing1 == "A":

  # do stuff here
madmonster (15)

@AzureScripts But I have done it and it still has the error message!

Geocube101 (591)

If conditional requires two equal signs

if this == that:
  #Do This