Can anyone tell me what's wrong with this code?

code

I’m getting a Syntax error on the Else: portion

Check your indentations.
If-else clauses have to be aligned

E.g.:

if x:
    #code
elif y:
    #code
else:
    #code

Also you want to revise your structure for things like

elif:
   not x
   #code
else:
   not y
   #code

this doesn’t actually do anything.
You might want something closer to

elif not x:
    #code
else: #notice this condition is implicit
    #code

else statements never use a condition, they are really meant to catch the complement of whatever logic you used up to that point. For example, if you have 5 max possible outcomes A, B, C, D, E and you have conditions to trigger from A and B, else will trigger from conditions C, D, E.

1 Like

Will have to look into your reply later thanks! I actually found the answer in another forum topic!

code