Need help with code else/elif

when I set my points to 0 it doesn’t even show me the “you dont have enough points” dialogue it just jumps to the gem choice.

I’m pretty sure in this case it would else :thinking:

1 Like

Hi there!

If you’re only going to have two options better to use if and else. So:

if (POINT > 0) {


} else {


> = greater than
< = less than
= is equals to

So by writing:

} elif (POINT < 0) {

It means the character POINT has less than 0 points (not equal to 0). So it would include -1, -2, etc. But not 0. Since 0 is greater than whatever POINT is assigned with.

1 Like

When I use else it wouldn’t work.

But I’ll try what @JemU776 said :heartpulse:

this is what happens when I use else

wait do i need to add the =0?

Did you name the choice?

1 Like


ooo doing else and removing =0 helped thank you both!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.