Side image error

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
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Side image error

#1 Post by Mooneon »

I really don't understand this error. Can someone help me clarify?

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 55, in script
    u tired"What an awful dream."
Exception: Say has image attributes (u'tired',), but there's no image tag associated with the speaking character.

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

Full traceback:
  File "game/script.rpy", line 55, in script
    u tired"What an awful dream."
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/ast.py", line 604, in execute
    renpy.exports.say(who, what, interact=self.interact)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/exports.py", line 1122, in say
    who(what, interact=interact)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/character.py", line 783, in __call__
    self.resolve_say_attributes(False, wanted=speaking)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/character.py", line 718, in resolve_say_attributes
    raise Exception("Say has image attributes %r, but there's no image tag associated with the speaking character." % (attrs,))
Exception: Say has image attributes (u'tired',), but there's no image tag associated with the speaking character.

Darwin-10.8.0-i386-64bit
Ren'Py 6.99.10.1227
Charmed Soul 0.0
This is my script code:

Code: Select all

#CHAPTER 1 - Red
stop music
play sound "blast.wav"
scene eye with flash
centered ""
scene treehouse with Dissolve(1.0)
play music "Alex_Fitch_-_07_-_Secret_Place.mp3"
u tired"What an awful dream."
u "Why does my brain choose to remind me of my past..?"
u "It's so.."
u "(Sighs..)"
u normal "Anyways.. It's another day."

And here is my character code:

Code: Select all

define u = Character("Umaris", color = "#921704",image = "uma",window_left_padding=230,)

image side uma normal ="umaris_normal.png"
image side uma tired = "umaris_tired.png"

User avatar
PetPeeve
Regular
Posts: 70
Joined: Tue Nov 06, 2012 10:40 am
Tumblr: agamemakingblogforcoolkids
Contact:

Re: Side image error

#2 Post by PetPeeve »

This may sound dumb, but do you have the image files in the images folder? If they are in sub-folders remember you have to include the folder in your declaration

Like

Code: Select all

image side uma normal ="folder/blank.png"
The error is basically that it can't find your image.
Avatar by shiohh
ImageImageImageImage

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Side image error

#3 Post by namastaii »

Did you define 'u tired'? It only shows that you defined 'u'

User avatar
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Re: Side image error

#4 Post by Mooneon »

But it's odd. On my other game this type of thing works!

Here's my the exact same thing I did on my other game.

My character code

Code: Select all

define v = Character("Valeriane", color = "#B097F3",image = "val",window_left_padding=230,)

image side val normal = "VAL/val_normal.png"
image side val normal talk = "VAL/val_talk1.png"
image side val ignore talk = "VAL/val_ignoretalk.png"
Script Code!:

Code: Select all

v ignore talk"Yes indeed, my lord..."
v normal talk"How do you know this, when you were trapped inside your own amulet?"
It worked in this game but it isn't working in my current game now.

User avatar
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Re: Side image error

#5 Post by Mooneon »

Why won't anyone help? :(

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: Side image error

#6 Post by chocoberrie »

It works in your other game because you defined the variable:

Code: Select all

define v = Character("Valeriane", color = "#B097F3",image = "val",window_left_padding=230,)

image side val normal = "VAL/val_normal.png"
image side val normal talk = "VAL/val_talk1.png"
image side val ignore talk = "VAL/val_ignoretalk.png"
In the above code, val ignore, for example, is defined by the side image, "VAL/val_ignoretalk.png". So, when you put val ignore in your script:

Code: Select all

val ignore talk"Yes indeed, my lord..."
val normal talk"How do you know this, when you were trapped inside your own amulet?"
The side image shows up, as it should.

In your current code, however, you don't define "u tired" with an image. You have this:

Code: Select all

#CHAPTER 1 - Red
stop music
play sound "blast.wav"
scene eye with flash
centered ""
scene treehouse with Dissolve(1.0)
play music "Alex_Fitch_-_07_-_Secret_Place.mp3"
u tired "What an awful dream."
u "Why does my brain choose to remind me of my past..?"
u "It's so.."
u "(Sighs..)"
u normal "Anyways.. It's another day."
You use "u tired" as a variable. But:

Code: Select all

define u = Character("Umaris", color = "#921704",image = "uma",window_left_padding=230,)

image side uma normal ="umaris_normal.png"
image side uma tired = "umaris_tired.png"
The image code has "uma tired". This is different from the variable "u tired." This is why the side image isn't showing up. The same is true for "u normal" and "uma normal."

In your script, you SHOULD have the following:

Code: Select all

#CHAPTER 1 - Red
stop music
play sound "blast.wav"
scene eye with flash
centered ""
scene treehouse with Dissolve(1.0)
play music "Alex_Fitch_-_07_-_Secret_Place.mp3"
uma tired "What an awful dream."
u "Why does my brain choose to remind me of my past..?"
u "It's so.."
u "(Sighs..)"
uma normal "Anyways.. It's another day."
See the difference? Hope this helps :)

User avatar
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Re: Side image error

#7 Post by Mooneon »

chocoberrie wrote:It works in your other game because you defined the variable:

Code: Select all

define v = Character("Valeriane", color = "#B097F3",image = "val",window_left_padding=230,)

image side val normal = "VAL/val_normal.png"
image side val normal talk = "VAL/val_talk1.png"
image side val ignore talk = "VAL/val_ignoretalk.png"
In the above code, val ignore, for example, is defined by the side image, "VAL/val_ignoretalk.png". So, when you put val ignore in your script:

Code: Select all

val ignore talk"Yes indeed, my lord..."
val normal talk"How do you know this, when you were trapped inside your own amulet?"
The side image shows up, as it should.

In your current code, however, you don't define "u tired" with an image. You have this:

Code: Select all

#CHAPTER 1 - Red
stop music
play sound "blast.wav"
scene eye with flash
centered ""
scene treehouse with Dissolve(1.0)
play music "Alex_Fitch_-_07_-_Secret_Place.mp3"
u tired "What an awful dream."
u "Why does my brain choose to remind me of my past..?"
u "It's so.."
u "(Sighs..)"
u normal "Anyways.. It's another day."
You use "u tired" as a variable. But:

Code: Select all

define u = Character("Umaris", color = "#921704",image = "uma",window_left_padding=230,)

image side uma normal ="umaris_normal.png"
image side uma tired = "umaris_tired.png"
The image code has "uma tired". This is different from the variable "u tired." This is why the side image isn't showing up. The same is true for "u normal" and "uma normal."

In your script, you SHOULD have the following:

Code: Select all

#CHAPTER 1 - Red
stop music
play sound "blast.wav"
scene eye with flash
centered ""
scene treehouse with Dissolve(1.0)
play music "Alex_Fitch_-_07_-_Secret_Place.mp3"
uma tired "What an awful dream."
u "Why does my brain choose to remind me of my past..?"
u "It's so.."
u "(Sighs..)"
uma normal "Anyways.. It's another day."
See the difference? Hope this helps :)

But I end up getting this error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 184, in script
    uma normal talk "No, not at all"
Exception: Sayer 'uma' is not defined.

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

Full traceback:
  File "game/script.rpy", line 184, in script
    uma normal talk "No, not at all"
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/ast.py", line 584, in execute
    who = eval_who(self.who, self.who_fast)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/ast.py", line 501, in eval_who
    raise Exception("Sayer '%s' is not defined." % who.encode("utf-8"))
Exception: Sayer 'uma' is not defined.

Darwin-10.8.0-i386-64bit
Ren'Py 6.99.10.1227
Charmed Soul 0.0

jw2pfd
Regular
Posts: 87
Joined: Tue Sep 18, 2012 9:55 pm
Location: DFW, TX, USA
Contact:

Re: Side image error

#8 Post by jw2pfd »

I noticed that you posted two threads. In this thread, you use image="uma" for the tag and image="umaris" as the tag in the other thread. Do you happen to have the define statement for u in multiple locations? The character u should only be defined once and if it's defined multiple times, then that could be causing a problem.

The only way I am able to recreate the error on my end is if the define statement is missing the image tag definition. Your code example in this thread:

Code: Select all

define u = Character("Umaris", color = "#921704",image = "uma",window_left_padding=230,)
...it should work although your syntax isn't clean with the unnecessary comma at the end.


The code seems to be interpreting it as if you defined the character like this:

Code: Select all

define u = Character("Umaris", color="#921704", window_left_padding=230)
...with the image = "uma" statement missing altogether.

I suggest looking for any accidental/additional define u statements that you might have left in your code somewhere.

User avatar
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Re: Side image error

#9 Post by Mooneon »

Woah woah I just realized I never put val ignore talk, in my code it's v ignore talk instead and it works perfectly!

Oh my godddd. I seriously can't do this anymore. I don't understand anything anymore!

MY CODE:

Code: Select all

v ignore talk"Yes indeed, my lord..."
v normal talk"How do you know this, when you were trapped inside your own amulet?"
My code works perfectly in this game!

Chocoberrie's edited code:

Code: Select all

val ignore talk"Yes indeed, my lord..."
val normal talk"How do you know this, when you were trapped inside your own amulet?"

jw2pfd
Regular
Posts: 87
Joined: Tue Sep 18, 2012 9:55 pm
Location: DFW, TX, USA
Contact:

Re: Side image error

#10 Post by jw2pfd »

Mooneon wrote:Woah woah I just realized I never put val ignore talk, in my code it's v ignore talk instead and it works perfectly!
It works with v ignore talk because you defined the character as v. You would only want to do val ignore talk if you defined the character as val, which you didn't. The code should also work for u tired because the character is defined as u. If it is not defined as uma, then you don't want to do uma tired.

The post I previously made had a decent suggestion that could be the cause of your problem.
jw2pfd wrote:I suggest looking for any accidental/additional define u statements that you might have left in your code somewhere.
And you would want to remove these additional define u statements if they exist.

User avatar
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Re: Side image error

#11 Post by Mooneon »

i can't take it anymore.

Is it possible if I can send you my whole game folder to you? Cause look i don't understand properly and in school i have a learning disability. So I don't understand things well.

EDIT*
okay. i'm sorry for being idiotic and having lack of brain cells. i've figured it out. thank you.

Because In the beginning of my game the first speech that my character says was this.

Code: Select all

show deer with dissolve
u "Domye. Come to visit with me while I pick some berries?"
d "Of course as always."
The first line wasn't u normal talk. Instead it was just "u"

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]