Odd issue with Calling screens

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
Thundy
Regular
Posts: 88
Joined: Tue Dec 05, 2017 9:08 am
Contact:

Odd issue with Calling screens

#1 Post by Thundy »

Hey folks.

I have a screen that I use to display tutorials and other game information. I do so by calling the screen whilst passing the information i want to display through as a string.
For some strange reason when i display the screen the messages are always one behind. I.e.

If i display the screen five times with the the strings "a", "b", "c", "d", "e" passed into it respectively
I get the output "a", "a", "b", "c", "d"

Any ideas why that might be

Code for the screen is:

Code: Select all

screen GuideScreen(inf):
    frame:
        xpadding 25
        ypadding 25
        xalign 0.5
        yalign 0.5
        has vbox
        label "Game Guide" xminimum 400
        text "[inf]"
        text ""
        button:
            text "{font=gui/fonts/GOTHIC.TTF}{color=#ffffff}{size=12}Close{/font}"
            background "#333"
            ypadding 3
            xpadding 14
            xalign 1.0
            yalign 1.0
            action Return()
            
and to display the screen i just do a:

Code: Select all

call screen GuideScreen("This is my message")

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Odd issue with Calling screens

#2 Post by Per K Grok »

Thundy wrote: Fri Jul 05, 2019 3:30 am Hey folks.

I have a screen that I use to display tutorials and other game information. I do so by calling the screen whilst passing the information i want to display through as a string.
For some strange reason when i display the screen the messages are always one behind. I.e.

If i display the screen five times with the the strings "a", "b", "c", "d", "e" passed into it respectively
I get the output "a", "a", "b", "c", "d"

Any ideas why that might be


I did a quick test run of your code and it worked without any problem for me.

Your problem probably is somewhere else in the code. You could not possibly have two calls with message "a"?

By the way, since 'inf' already is a string you don't have to do
text "[inf]"

text inf
will work fine.

Thundy
Regular
Posts: 88
Joined: Tue Dec 05, 2017 9:08 am
Contact:

Re: Odd issue with Calling screens

#3 Post by Thundy »

Thanks for the assist. It seems to have sorted itself out on its own which is worrying.

Post Reply

Who is online

Users browsing this forum: Google [Bot]