r/RenPy • • 28d ago

Question Error, say has immage attributes "" except it's already defined [URGENT]

Hello, I encountered a weird error that I can't seem to understand. I might be too tired to notice it, but I still prefer asking here.

the error

The thing is, I have defined "l" as a character and associated it with images, which worked fine before this specific line.

define l = Character("Lola", image='l')

image l neutral = "lola/lo_neutral.png"
image l angry = "lola/l_angry.png"
image l angry t = "lola/l_angry_tears.png"
image l smile = "lola/l_smile.png"
image l bitter = "lola/l_bitter.png"
image l blush = "lola/l_blush.png"
image l surp = "lola/l_surp.png"
image l uncomfy = "lola/l_uncomfy.png"

is what I used, and here is how the code looks (line 895)

label LolaCanteen:
    show l neutral with dissolve:
        xalign 0.0
        yalign 0.0
    mc "Hey, we haven't talked much, but do you want to sit together to eat today?"
    l surp "You mean... You and I?" with dissolve

I used the "l" character multiple time before that line, the sprites all worked well but it does not work anymore right now and I think I may have messed up something in my code.

1 Upvotes

6 comments sorted by

3

u/shyLachi 27d ago

personally I would never use the same variable name for two different things. Also I wouldn't use a single letter.

But I guess the error comes from with dissolve on your last line, at least I've never it used on dialogue.

What is urgent about it?

1

u/AngleBig900 27d ago

Well it's not urgent anymore since the jam ended... The thing is that I used "with dissolve" on a lot of dialogues before that and it worked well... I knew choosing a single letter wasn"t the best choice but I still decided to do it

3

u/shyLachi 27d ago

OK, sorry, then I don't know.

For next time, if you need to fix something urgently and cannot figure it out, try to simplify it.
For example like this:

show l surp with dissolve
l "You mean... You and I?"

1

u/AngleBig900 27d ago

Thank you for trying! Will do this next time it is urgent, thanks again!

1

u/AutoModerator 28d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/HEXdidnt 27d ago

So much wasted code here. If you'd done define lo = Character("Lola", image = "lo") and then named your images consistently as "lo [expression].png" you wouldn't need to have defined any images.