Inquiry regarding Digital Calendar

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
PixelFade
Regular
Posts: 67
Joined: Mon Mar 25, 2013 11:20 pm
Contact:

Inquiry regarding Digital Calendar

#1 Post by PixelFade » Sun Mar 31, 2013 12:18 pm

Hello,

I had an inquiry regarding the digital calendar found here.

After putting in the code in a seperate rpy file, the game will run. However, when I say to show it using this (indentation is correct, the quotes is not showing it),
if(clock):
$ Calendar()
$ Clocks()
I get the following error:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 25, in script
Exception: The say screen (or show_function) must return a Text object.

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "C:\Users\renpy-6.15.2-sdk\renpy\execution.py", line 288, in run
node.execute()
File "C:\Users\renpy-6.15.2-sdk\renpy\ast.py", line 453, in execute
renpy.exports.say(who, what, interact=self.interact)
File "C:\Users\renpy-6.15.2-sdk\renpy\exports.py", line 755, in say
renpy.store.say(who, what, interact=interact)
File "C:\Users\renpy-6.15.2-sdk\renpy\defaultstore.py", line 340, in say
who(what, interact=interact)
File "C:\Users\renpy-6.15.2-sdk\renpy\character.py", line 789, in __call__
self.do_display(who, what, cb_args=self.cb_args, **display_args)
File "C:\Users\renpy-6.15.2-sdk\renpy\character.py", line 671, in do_display
**display_args)
File "C:\Users\renpy-6.15.2-sdk\renpy\character.py", line 453, in display_say
raise Exception("The say screen (or show_function) must return a Text object.")
Exception: The say screen (or show_function) must return a Text object.

Windows-7-6.1.7601-SP1
Ren'Py 6.15.2.281
A Ren'Py Game 0.0
my line 25 is just basic text:
"Person" "Hello world."
What's strange is if I keep clicking ignore and go to a Menu option, it displays the digital clock correctly but then goes back to the error after a selection is made.
I have not modified any UI functions or appearance, they are all original Ren'Py files.

Can you please provide assistance in this matter?

Thanks!

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: Inquiry regarding Digital Calendar

#2 Post by apricotorange » Mon Apr 01, 2013 12:36 am

You can use [code] to quote code here with correct indentation.

I think the intent of the author is that you're supposed to add the code in question to the existing "screen say" in screens.rpy, rather than copy-pasting it into a new file. Something like the following:

Code: Select all

##############################################################################
# Say
#
# Screen that's used to display adv-mode dialogue.
# http://www.renpy.org/doc/html/screen_special.html#say
screen say:
    # Insert this code:
    if(clock):
        $ Calendar()
        $ Clocks()

    # The default screen say continues:

    # Defaults for side_image and two_window
    default side_image = None
    default two_window = False

    [...]

Post Reply

Who is online

Users browsing this forum: Google [Bot]