Exception: possible infinite loop

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
Yeto
Newbie
Posts: 18
Joined: Sun Sep 04, 2011 5:11 am
Contact:

Exception: possible infinite loop

#1 Post by Yeto »

Code: Select all

screen world():
    imagemap:
        ground 'images/bg/interface.png'
        hover ''
        alpha False
        add "bg/actionleiste 1.png" ypos 532
        add "welt/himmel/himmel 1 1.png" xpos 136 ypos 136
        add "wand/Gra4000.png" xpos 136 ypos 138
        add "wand/Gra4004.png" xpos 270 ypos 177
        hotspot(750,0,50,50):
            action Return("Exit")


label start:
    $ TEST = []
    
label mainloop:
    show screen world
    $ myAction = _return
    if myAction == "Exit":
        jump ende
    jump mainloop

label ende:
    return
damn: howto avoid exception??? :shock:

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Exception: possible infinite loop

#2 Post by hell_oh_world »

Yeto wrote: Mon May 04, 2020 8:36 am

Code: Select all

screen world():
    imagemap:
        ground 'images/bg/interface.png'
        hover ''
        alpha False
        add "bg/actionleiste 1.png" ypos 532
        add "welt/himmel/himmel 1 1.png" xpos 136 ypos 136
        add "wand/Gra4000.png" xpos 136 ypos 138
        add "wand/Gra4004.png" xpos 270 ypos 177
        hotspot(750,0,50,50):
            action Return("Exit")


label start:
    $ TEST = []
    
label mainloop:
    show screen world
    $ myAction = _return
    if myAction == "Exit":
        jump ende
    jump mainloop

label ende:
    return
damn: howto avoid exception??? :shock:
should be call screen and not show screen. Show screen will not prevent any interaction, so it will just pass by and proceed to the next statement.

Post Reply

Who is online

Users browsing this forum: No registered users