6.18 "if" statements bug in screens

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

6.18 "if" statements bug in screens

#1 Post 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!
Finished games:
Image
Image
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: 6.18 "if" statements bug in screens

#2 Post by PyTom »

This has been fixed in master. It will be the next nightly, and 6.18.3.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: 6.18 "if" statements bug in screens

#3 Post by qirien »

Thank you so much for the speedy fix!
Finished games:
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users