Help with Points please


#1

So I have this in my story
if (ANABARTA < -2) {
goto do_it_bad
}
if (ANABARTA = -2) {
goto do_it_bad
}
elif (ANABARTA > -2) {
goto do_it_good
}
elif (ANABARTA = 4) {
goto ho_don_doit
}

however all of them work except the last one and idk how to fix it so that if you have 4 points it works :confused:


#2

You need to write it like:

if (ANABARTA < -2) {
goto do_it_bad
} elif (ANABARTA = -2) {
goto do_it_bad
} elif (ANABARTA > -2) {
goto do_it_good
} else {
goto ho_don_doit
}

Then it will work perfectly!


#3

Thank you!


#4

wait I wanted it to go to a specific label though only if you can get a perfect score of points which would be 4, will this do that?


#5

Yes, you always need to end with an “else” it just goes the what happens if people didn’t choose any of the above, if they chose something else. It will work the same as when you specify something. (Of course you can only use one “else” and one “if”, if you want to write more than 3 options, write “elif” more then once in the middle)


#6

Closing due to one month of inactivity :slight_smile:


#7