help !! error call screen

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
Sirdheenz
Newbie
Posts: 11
Joined: Wed Jan 31, 2018 6:15 am
Contact:

help !! error call screen

#1 Post by Sirdheenz »

I have a problem in the "Call screen" command in imagebutton .. I do not know if there is a mistake in line, image, or code .. can help me in this problem .. this code ..

Code: Select all

screen myroom:
          add "bg/myroom.jpg"
          imagebutton:
          focus_mask True
          idle "object/bed.png"
          hover "object/bedh.png"
          action Jump ("mybed")
label mybed:
               "i want sleep"
               scene black with dissolve
               jump myroom
and here label start.

Code: Select all

label start:
"jakajammmmm"
jump myroom
and here label myroom bcus i command jump myroom

Code: Select all

label myroom:
call screen myroom
and get message error
(in script line2 call screen myroom)
(in execute_call_screen_store._ return = renpy.call_screen(name. *args .*kwargs))
something like..

i dont know what was that..
i need help

User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: help !! error call screen

#2 Post by 78909087 »

To me, this looks like an indentation error. Check that you code follows this indentation.

Code: Select all

screen myroom:
        add "bg/myroom.jpg"
        imagebutton:
        focus_mask True
        idle "object/bed.png"
        hover "object/bedh.png"
        action Jump ("mybed")
label mybed:
        "i want sleep"
        scene black with dissolve
        jump myroom

Code: Select all

label start:
        "jakajammmmm"
        jump myroom
And then,

Code: Select all

label myroom:
        call screen myroom
Whitespace, or the 'blank' in Ren'py are important for the software to be able to understand what you want it to do. This is true for Python coding too, and I press that indentation is very important.

Please try this and tell me if your issue has been solved.
I am not friends with the sun.
Image

Sirdheenz
Newbie
Posts: 11
Joined: Wed Jan 31, 2018 6:15 am
Contact:

Re: help !! error call screen

#3 Post by Sirdheenz »

78909087 wrote: Thu Mar 01, 2018 7:47 am To me, this looks like an indentation error. Check that you code follows this indentation.

Code: Select all

screen myroom:
        add "bg/myroom.jpg"
        imagebutton:
        focus_mask True
        idle "object/bed.png"
        hover "object/bedh.png"
        action Jump ("mybed")
label mybed:
        "i want sleep"
        scene black with dissolve
        jump myroom

Code: Select all

label start:
        "jakajammmmm"
        jump myroom
And then,

Code: Select all

label myroom:
        call screen myroom
Whitespace, or the 'blank' in Ren'py are important for the software to be able to understand what you want it to do. This is true for Python coding too, and I press that indentation is very important.

Please try this and tell me if your issue has been solved.
already sir.. but always get message error that with error imagebutton:<- T_T

User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: help !! error call screen

#4 Post by 78909087 »

My mistake not paying attention to the code. This is the correct indentation.

Code: Select all

screen myroom:
    add "bg/myroom.jpg"
    imagebutton:
        focus_mask True
        idle "object/bed.png"
        hover "object/bedh.png"
        action Jump ("mybed")
label mybed:
    "i want sleep"
    scene black with dissolve
    jump myroom


label start:
    "jakajammmmm"
    jump myroom


label myroom:
    call screen myroom
Please try this. I tested it in my editra and it worked.
I am not friends with the sun.
Image

Sirdheenz
Newbie
Posts: 11
Joined: Wed Jan 31, 2018 6:15 am
Contact:

Re: help !! error call screen

#5 Post by Sirdheenz »

78909087 wrote: Thu Mar 01, 2018 10:51 am My mistake not paying attention to the code. This is the correct indentation.

Code: Select all

screen myroom:
    add "bg/myroom.jpg"
    imagebutton:
        focus_mask True
        idle "object/bed.png"
        hover "object/bedh.png"
        action Jump ("mybed")
label mybed:
    "i want sleep"
    scene black with dissolve
    jump myroom


label start:
    "jakajammmmm"
    jump myroom


label myroom:
    call screen myroom
Please try this. I tested it in my editra and it worked.
wow that work.. thank sir :D :D

User avatar
Taleweaver
Writing Maniac
Posts: 3428
Joined: Tue Nov 11, 2003 8:51 am
Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
Organization: Tall Tales Productions
Location: Germany
Contact:

Re: help !! error call screen

#6 Post by Taleweaver »

Moved to Ren'Py questions.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of Daemonophilia
Scriptwriter and director of The Dreaming
Scriptwriter of Zenith Chronicles
Scriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is Dead
Scriptwriter and producer of Adrift
More about me in my blog
"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: help !! error call screen

#7 Post by xavimat »

Be careful, you are using the name "myroom" for a label AND a screen. Don't do that, renpy will get confused.
Also, always add the parentehsys (even empty) in your screen definitions:

Code: Select all

screen whatever():
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]