1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Is if...else if...else permitted in GMS2?

Discussion in 'Programming' started by krugen, Aug 16, 2019.

  1. krugen

    krugen Member

    Joined:
    Jan 24, 2019
    Posts:
    180
    I tried the combination if...else if...else, it does not work. Based on the condition I have set, it is suppose to execute the last else statement. But it just skips it.

    Just wanna know if anyone tried this and worked. If so, I must have done something wrong.
     
  2. curato

    curato Member

    Joined:
    Jun 30, 2016
    Posts:
    421
    works for me. post the code and we will look at it.
     
  3. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,603
    if-else-if ladders are so fundamental to structured programming that if the compiler failed to handle it properly, it would have been reported right away as an urgent matter and hotfixed immediately. Given that there have been no such actions, chances are it's you doing something improper with your conditions.
     
    Carbon likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice