I'm trying to call a function that would in turn call a screen:
Code: Select all
init python:
def test():
renpy.call_screen('sample_text')
screen sample_text:
text 'TESTING IF THIS SCREEN WILL WORK OR NOT' size 100
Code: Select all
screen button_test:
frame:
background '#ffffff'
xysize(50,50)
align(0.5,0.5)
button action Function(test)
Here is my problem: I'm getting a
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 16, in script
call screen button_test
File "renpy/common/000statements.rpy", line 485, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "renpy/common/00action_other.rpy", line 501, in __call__
rv = self.callable(*self.args, **self.kwargs)
File "game/test screen.rpy", line 3, in test
renpy.call_screen('sample_text')
Exception: Cannot start an interaction in the middle of an interaction, without creating a new context.
So far I really have no clue what that means by interaction in the middle of another I saw a similar post here viewtopic.php?t=18843 but even then I can't really wrap my head around this. Also, I can't just simply use the call screen to directly call the sample_text since in my program the screen call is directly coming from a python block inside a class method. Anyway, any help is appreciated and thanks in advance.