Exception: Exception: ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?

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
teamace
Newbie
Posts: 10
Joined: Thu Oct 26, 2017 11:14 am
Contact:

Exception: Exception: ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?

#1 Post by teamace »

I'm trying to create an imagemap wherein there are 2 rooms for the player to find the missing item in a given amount of time. And then I encountered this error:
Exception: Exception: ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?

Code: Select all

init python:
    def countdown(st, at, length=0.0):
        global remaining
        remaining = length - st
        
        if remaining >= 10.0:
            return Text("[remaining:.1f]", color="#fff", size=72), .1

        if remaining <= 0.0:
            renpy.hide_screen( 'test' )
           
        
        return Text("[remaining:.1f]", color="#f00", size=72), .1
      
image countdown = DynamicDisplayable(countdown, length=15.0)
# default remaining = 15.0
screen find_card:
    
    imagemap:
                ground "WAREHOUSE1.jpg"
                hover "WAREHOUSE1_hover.jpg"
                
                #1025, 362, 80,46 
                hotspot (1025, 362, 80, 46) clicked Jump("found_me") 
                #899,484,81,87
                hotspot (1025, 362, 80, 46) action [Function(renpy.call_screen("find_card2"))]
                

screen find_card2:
    imagemap:
                ground "WAREHOUSE2.jpg"
                hover "WAREHOUSE2_hover.jpg"
                
                #561,530,22,84
                hotspot (561, 530, 22, 84) action [Function(renpy.call_screen("find_card"))]
                
                

label start:
    "this is a text"
    show countdown at center
    call screen find_card
    "test"

label found_me:
    if remaining >= 10.0:
        jump scene1
    elif remaining <= 0.0:
        jump scene2
        
    
label scene1:
    "Good Ending"
    return

label scene2:
    "Bad Ending"
    return

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Exception: Exception: ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?

#2 Post by Remix »

Function( function_name, arguments, keyword_arguments )
so, basically...
Function( renpy.call_screen, "find_card" )

There might be other issues, I've never used imagemaps (imagebuttons are more versatile for my uses) so cannot really tell.
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Google [Bot]