Invalid syntax when trying to do a CTC icon

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
User avatar
chesarty
Regular
Posts: 116
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Invalid syntax when trying to do a CTC icon

#1 Post by chesarty »

I wanted to add a cute little icon where it shows when you're supposed to click to continue, but I get this error message:

[code]
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 6: invalid syntax
Character("Enzo", color = "#ffffff", image ctc_animation = Animation("continue1.png", 0.2, "continue2.png", 0.2, "continue3.png", 0.2, "continue4.png", 0.2, xpos=0.99, ypos=0.99, xanchor=1.0, yanchor=1.0))
^

Ren'Py Version: Ren'Py 7.0.0.196
Sun Aug 26 01:09:19 2018
[/code]


I followed this guide: https://www.renpy.org/wiki/renpy/doc/co ... appearance
What exactly am I doing wrong here? Probably something obvious, but I'm a noob. :P

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Invalid syntax when trying to do a CTC icon

#2 Post by vollschauer »

Don't define the ctc image inside of you character definition. It' more like:

Code: Select all

image ctc_animation = Animation("continue1.png", 0.2, "continue2.png", 0.2, "continue3.png", 0.2, "continue4.png", 0.2, xpos=0.99, ypos=0.99, xanchor=1.0, yanchor=1.0)
Character("Enzo", color = "#ffffff", ctc="ctc_animation", ctc_position="nestled")

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot]