Hi,
I'm sure this error is quite common, but roaming around other topics with the same issue hasn't helped me.
So in my game, I'm using a screen which controls everything. The screen background shows my locations, and on that same screen there's an HUD with 3 "skip time" buttons, and one extra to open a menu.
The screen is called inside a while loop which goes as follows :
While etc:
if SceneToCall == "empty":
$ SceneToCall = renpy.call_screen("Overlay", _layer="screens")
jump expression SceneToCall (for example, "Add_1H")
That way that screen will RETURN label names (through imagebuttons, action()) and the game will jump to the desired expression like "Add_1H", and then inside that label I can make all the verifications I need to make.
For a while now I've come to the conclusion that this system is a bit clumsy, but when I started Ren'py that's the only way I found to make the system work. So I wanna change things a bit and ditch the whole while loop and, and that's what's causing me problems right now, the "Return value/SceneToCall variable" system and directly, in the imagebuttons, call the desired labels.
In short, remove the "imagebutton -> action(Return)" and replace it with "imagebutton -> action(renpy.call("label")".
Problem is, renpy gives me an error at a dialogue that's present in my "add_1H" label, which tells the player why they can't skip time.
This system worked fine with the old system, and I don't get why it's not working now.
ui.interact called with non-empty widget/layer stack
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.
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.
Re: ui.interact called with non-empty widget/layer stack
If you used jump then you probably want to use Jump action:
Code: Select all
imagebutton:
action Jump("label_name_as_string")
Code: Select all
imagebutton:
action Call("label_name_as_string")
Your mistake is likely how you call label. if you use Function with renpy.call, you need to pass arguments after the comma:
Code: Select all
imagebutton:
action Function(renpy.call, "label_name_as_string")
Re: ui.interact called with non-empty widget/layer stack
Hey, thank you for your answer!
Yes, I replaced renpy.call() with just Call() and it worked... This engine is a mistery to me sometimes...
Anyway, thanks again!
Yes, I replaced renpy.call() with just Call() and it worked... This engine is a mistery to me sometimes...
Anyway, thanks again!
Who is online
Users browsing this forum: Bing [Bot]