GMS 2 while else?

Discussion in 'Programming' started by Neptune, Jan 14, 2020 at 10:51 PM.

  1. Neptune

    Neptune Member

    Joined:
    Jun 21, 2016
    Posts:
    1,069
    Is this a thing?
    Code:
    while (conditions)
    {
    
    }
    else
    {
    
    }
    I think other languages sometimes have while-variations, does GML have any?
     
  2. Binsk

    Binsk Member

    Joined:
    Jun 22, 2016
    Posts:
    648
    Everything after a while loop is effectively an "else".

    If you want to only do code if the while never ran the put a variable check in the loop or place it all in an if statement with the same check.
     
  3. Neptune

    Neptune Member

    Joined:
    Jun 21, 2016
    Posts:
    1,069
    I just want it to be cleeean. Alrighty
     

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