Page 1 of 1

6.18 "if" statements bug in screens

Posted: Tue Oct 14, 2014 2:15 pm
by qirien
When using 6.18.2, I noticed that sometimes when I have "if" statements inside a screen, all of the possibilities are shown instead of just the proper one. For example:

Code: Select all

screen boolean_test:
    $ option1 = True
    window:
        frame:
            vbox:
                label "Boolean test"
                vbox:
                    if option1:
                        text "Option 1"
                        text "Not 2"
                    else:
                        text "Option 2"
                        text "Not 1"
                    text "3"                    

label start:
    "This is a test of boolean functions within a screen"
    call screen boolean_test
    return
When you first run this code, the screen will show "Option 1" {b}and{/b} "Option 2", even though option1 is True. If you shift-R to reload, the screen will display properly. If you go to the Main Menu and start over, it will display improperly. I have reproduced this bug on Windows and Linux, but only with Ren'py 6.18, not 6.17.

Let me know if you need any further information about this bug. Thank you!

Re: 6.18 "if" statements bug in screens

Posted: Tue Oct 14, 2014 6:07 pm
by PyTom
This has been fixed in master. It will be the next nightly, and 6.18.3.

Re: 6.18 "if" statements bug in screens

Posted: Tue Oct 14, 2014 9:42 pm
by qirien
Thank you so much for the speedy fix!