It is illegal to fall in to an *else statement trouble

i keep getting an “It is illegal to fall in to an *else statement” on line 7662 which is:
"*elseif ((next_destination = "Blue Banner") and (greenbanner))"

*label determine_next_destination
*comment started with purplebanner
*if ((next_destination = "Purple Banner") and (bluebanner))
    *set next_destination "Blue Banner"
    *goto blue_banner_scene
*elseif ((next_destination = "Purple Banner") and (greenbanner))
    *set next_destination "Green Banner"
    *goto green_banner_scene
*elseif ((next_destination = "Purple Banner") and (yellowbanner))
    *set next_destination "Yellow Banner"
    *goto yellow_banner_scene
*elseif ((next_destination = "Purple Banner") and (blackbanner))
    *set next_destination "Black Banner"
    *goto black_banner_scene
*comment started with Blue Banner
*elseif ((next_destination = "Blue Banner") and (greenbanner))
    *set next_destination "Green Banner"
    *goto green_banner_scene
*elseif ((next_destination = "Blue Banner") and (yellowbanner))
    *set next_destination "Yellow Banner"
    *goto yellow_banner_scene
*elseif ((next_destination = "Blue Banner") and (blackbanner))
    *set next_destination "Black Banner"
    *goto black_banner_scene
*comment started with Green Banner
*elseif ((next_destination = "Green Banner") and (yellowbanner))
    *set next_destination "Yellow Banner"
    *goto yellow_banner_scene
*elseif ((next_destination = "Green Banner") and (blackbanner))
    *set next_destination "Black Banner"
    *goto black_banner_scene
*comment started with yellow banner
*elseif ((next_destination = "Yellow Banner") and (blackbanner))
    *set next_destination "Black Banner"
    *goto black_banner_scene
*elseif ((next_destination = "Black Banner") and (not(blackbanner)))
    *goto home_base
*else
    *goto home_base

I can’t figure out what’s different about that specific line, any ideas? I have a feeling I’m missing something super obvious

1 Like

Your *comments are breaking up the code. With that first *comment indented at the same level as the original *if, you’re telling the game that if/elseif block is over. Then it’s confused that you’re trying to start the next block with an *elseif (“falling into” it, rather than starting properly with an *if).

Indent the comments to fall under the elseif where they apply, rather than above it, and it should work.

3 Likes

Thank you! Knew it was going to be something super obvious…

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.