[SOLVED] Problem with say_two_window

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Soliloquy
Regular
Posts: 73
Joined: Tue Aug 25, 2015 3:42 pm
Location: Mt Holly, NJ
Contact:

[SOLVED] Problem with say_two_window

#1 Post by Soliloquy »

I've been away from Ren'Py for a while, like for maybe about a year. So I'm sure I've jumped a few updates between this time in 2016 and now. After the last update, I get an error when I make changes to the following code, specifically when I add the char_choice variable.

Code: Select all

screen character_select:
    imagemap:
        ground "menu/character_select.png"
        hover "menu/character_select_frames.png"
    
        alpha False
        hotspot(19,16,238,568) action [SetVariable("name1", "Gemini"), SetVariable("class1", "Healer"), SetVariable("char_choice", "g"), Return("smth")]
        hotspot(286,15,238,568) action [SetVariable("name1", "Orin"), SetVariable("class1", "Queen") Return("smth")]
        hotspot(548,15,240,567) action [SetVariable("name1", "Vyvian"), SetVariable("class1", "Black Widow")Return("smth")]
Upon adding the variable to the middle, last, or both hotspots, I get this error.

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/screens.rpy", line 34: u'style' is not a keyword argument or valid child for the screen statement.
    style "say_two_window_vbox"
         ^

Ren'Py Version: Ren'Py 6.99.13.2919
Now, a few versions ago, style say_two_window was the default, and I haven't changed anything in that whole screen, and this only happened after I updated to the most recent version. Is this something that can be fixed on my end or a bug that needs reporting?
Last edited by Soliloquy on Wed Nov 22, 2017 9:22 pm, edited 1 time in total.

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Problem with say_two_window

#2 Post by vollschauer »

I'm pretty sure you need to fix that on you end, whatever is in "game/screens.rpy", line 34 .....

User avatar
Soliloquy
Regular
Posts: 73
Joined: Tue Aug 25, 2015 3:42 pm
Location: Mt Holly, NJ
Contact:

Re: Problem with say_two_window

#3 Post by Soliloquy »

vollschauer wrote: Wed Nov 22, 2017 4:11 am I'm pretty sure you need to fix that on you end, whatever is in "game/screens.rpy", line 34 .....
I need someone to tell me how, because it's literally what comes in the "screens" rpy when you set up a game for the first time. Or, it used to be. It's like Ren'Py doesn't recognize last year's code. This is the whole thing, and the syntax error is the line at the top, which used to be the default else statement. I have no idea what to change, or why.

Code: Select all

        style "say_two_window_vbox"
        window:
            id "window"

            has vbox:
                style "say_vbox"


            text what id "what"
        
        if who:
            window:
                style "say_who_window"
                    

                text who:
                    id "who"

Errilhl
Regular
Posts: 164
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Deviantart: studioerrilhl
Github: studioerrilhl
Contact:

Re: Problem with say_two_window

#4 Post by Errilhl »

So, basically, your style-statement is not allowed the way it's being used by you, in the latest release. Probably due to some changes.

Since you don't show the entire code, it's hard to tell, but here's a bit taken from the game_menu()-screen:

Code: Select all

screen game_menu(title, scroll=None, yinitial=0.0):

    style_prefix "game_menu"

    if main_menu:
        add gui.main_menu_background
    else:
        add gui.game_menu_background

    frame:
        style "game_menu_outer_frame"
As you can see, there is a style_prefix statement, and the style-statement is inside frame: in this instance. Other screens have style-statements, but they seem to be put lower down, after the other bits and pieces (like vbox) - have another look at how the different screens are set up, and try modifying the placement of the style-tag that doesn't work.
Currently working on: Image

User avatar
Soliloquy
Regular
Posts: 73
Joined: Tue Aug 25, 2015 3:42 pm
Location: Mt Holly, NJ
Contact:

Re: Problem with say_two_window

#5 Post by Soliloquy »

Errilhl wrote: Wed Nov 22, 2017 8:02 pm As you can see, there is a style_prefix statement, and the style-statement is inside frame: in this instance. Other screens have style-statements, but they seem to be put lower down, after the other bits and pieces (like vbox) - have another look at how the different screens are set up, and try modifying the placement of the style-tag that doesn't work.
Thank you! The style_prefix worked great! I knew SOMETHING had changed with the latest release, but couldn't pin down what, even trying to look through a new project. So thank you very much. ^^

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], geoWaffle