Cannot define a character...

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
Sanehouse
Newbie
Posts: 5
Joined: Wed Nov 11, 2009 7:08 pm
Contact:

Cannot define a character...

#1 Post by Sanehouse »

I just downloaded Ren'Py and decided to see if I could get some of the features to work. I get the error message when I try to run the game:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 2 of C:\Renpy\renpy-6.9.3\experimenting/game/script.rpy: expected statement.
define n = Character('Narrator', color="#ff0000")
^

Ren'Py Version: Ren'Py 6.9.3c
This is the full script thusfar:
# Characters
define n = Character('Narrator', color="#ff0000")

label start:

play music "donna.mp3"

window show

n "This is a test message."
n "Testing..."
n "...1"
n "...2"
n "...3"

window hide

return
Any help is much appreciated. Thanks.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Cannot define a character...

#2 Post by JQuartz »

Sanehouse wrote:Any help is much appreciated.
Use:

Code: Select all

# Characters
$ n = Character('Narrator', color="#ff0000")
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Sanehouse
Newbie
Posts: 5
Joined: Wed Nov 11, 2009 7:08 pm
Contact:

Re: Cannot define a character...

#3 Post by Sanehouse »

I've done that, and the error message has changed. It is now:
Exception: Sayer 'n' is not defined.

While running game code:
- script at line 10 of C:\Renpy\renpy-6.9.3\experimenting/game/script.rpy

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Cannot define a character...

#4 Post by PyTom »

The define statement is new in 6.10. If you download that, it will work.

(One problem with wiki-based documentation is that there isn't a good way to stage documentation in anticipation of a release.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Sanehouse
Newbie
Posts: 5
Joined: Wed Nov 11, 2009 7:08 pm
Contact:

Re: Cannot define a character...

#5 Post by Sanehouse »

I downloaded Ren'Py for the first time a few minutes before I started this thread. Has there been a release since then?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Cannot define a character...

#6 Post by PyTom »

6.10 is the pre-release. You probably downloaded the stable release.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Sanehouse
Newbie
Posts: 5
Joined: Wed Nov 11, 2009 7:08 pm
Contact:

Re: Cannot define a character...

#7 Post by Sanehouse »

Well, that did it. It works now. Thanks for your help, JQuartz and PyTom.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot