Ren'Py Keep getting error lines

paulnvt

Newbie
Jan 24, 2025
22
19
12
Hello all,

I have written an visual novel. I used coding help to write the scenes and choices.
But I keep getting error lines when I try to test launch te project. I tried chat gpt to look at te problems.
After recommended changes I get new errors.

Also, are there any good sites for AI driven artwork?
I found 2 or 3 within this forum but all keep up giving me artwork that is way to anime style for me.
I'd still like some realism in my visuals.

Any tips are welcome.
 

paulnvt

Newbie
Jan 24, 2025
22
19
12
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 18: expected statement.
    "Yes":
         ^

File "game/script.rpy", line 20: expected statement.
    "No":
        ^

File "game/script.rpy", line 41: expected statement.
    "Feel proud and tease her later.":
                                     ^

File "game/script.rpy", line 46: expected statement.
    "Feel a bit jealous but hide it.":
                                     ^

File "game/script.rpy", line 51: expected statement.
    "Ignore it, focus on yourself.":
                                   ^

File "game/script.rpy", line 62: expected statement.
    "Something subtly sexy, to tease her and others.":
                                                     ^

File "game/script.rpy", line 67: expected statement.
    "Something sporty but flattering.":
                                      ^

File "game/script.rpy", line 78: expected statement.
    "Yes, share your thoughts.":
                               ^

File "game/script.rpy", line 83: expected statement.
    "No, keep it to yourself.":
                              ^

File "game/script.rpy", line 93: expected statement.
    "Yes, read it together.":
                            ^

File "game/script.rpy", line 97: expected statement.
    "No, avoid it.":
                   ^

File "game/script.rpy", line 109: expected statement.
    "Approach Cliff and introduce yourself.":
                                            ^

File "game/script.rpy", line 112: expected statement.
    "Watch from a distance.":
                            ^

File "game/script.rpy", line 124: expected statement.
    "Excited and curious.":
                          ^

File "game/script.rpy", line 129: expected statement.
    "Jealous but willing to explore.":
                                     ^

File "game/script.rpy", line 134: expected statement.
    "Uncomfortable, want to stop it.":
                                     ^

File "game/script.rpy", line 151: expected statement.
    "Yes, invite him into your game.":
                                     ^

File "game/script.rpy", line 155: expected statement.
    "No, keep it private between you and {partner_name}.":
                                                         ^

File "game/script.rpy", line 167: expected statement.
    "Elegant and sensual.":
                          ^

File "game/script.rpy", line 172: expected statement.
    "Bold and daring.":
                      ^

File "game/script.rpy", line 185: expected statement.
    "Seeing Barbara with Cliff, sharing the moment.":
                                                    ^

File "game/script.rpy", line 190: expected statement.
    "Barbara enjoying attention from others, your connection growing stronger.":
                                                                               ^

File "game/script.rpy", line 203: expected statement.
    "Encourage and join in.":
                            ^

File "game/script.rpy", line 206: expected statement.
    "Feel jealous but stay involved.":
                                     ^

File "game/script.rpy", line 209: expected statement.
    "Pull back and rethink boundaries.":
                                       ^

Ren'Py Version: Ren'Py 8.3.7.25031702
Wed Jun  4 10:56:44 2025
 

Winterfire

Conversation Conqueror
Respected User
Game Developer
Sep 27, 2018
6,523
9,364
800
Stop using AI for things you don't understand or have no clue about, and actually bother to learn. Ren'Py "scripting" is extremely basic, if you can't be bothered to put at least that much effort, just move on to do something else you actually enjoy.


-edit-
Here's a good tutorial to get you started, old but good:
Once you understand how it works, you can actually use AI to help yourself and understand when it's being wrong.
 

paulnvt

Newbie
Jan 24, 2025
22
19
12
Stop using AI for things you don't understand or have no clue about, and actually bother to learn. Ren'Py "scripting" is extremely basic, if you can't be bothered to put at least that much effort, just move on to do something else you actually enjoy.


-edit-
Here's a good tutorial to get you started, old but good:
Once you understand how it works, you can actually use AI to help yourself and understand when it's being wrong.
I get your point of view.
I might like to add, i wrote the script myself en used co pilot to check the script.

But Im willing to grind the hours to master it. Trust me.

So if I came of like a lazy bum, looking for hand outs. Sorry that I did just that.
 

Winterfire

Conversation Conqueror
Respected User
Game Developer
Sep 27, 2018
6,523
9,364
800
I get your point of view.
I might like to add, i wrote the script myself en used co pilot to check the script.

But Im willing to grind the hours to master it. Trust me.

So if I came of like a lazy bum, looking for hand outs. Sorry that I did just that.
The problem is most likely which most likely means copy/pasting. AI can make errors, or "hallucinate", and it's up to you to figure out when it's a basic error.
Most of Ren'Py scripting is:
Speaker "Dialogue"

Just watch the tutorial, and rewrite it yourself in the correct way, and the errors will be gone. Helping yourself with AI is completely fine, but you need to at least have the basic knowledge to know when the AI is wrong, or gave you the right answer in the wrong format.

Ultimately, trust AI less, and improve yourself more.
 

paulnvt

Newbie
Jan 24, 2025
22
19
12
The problem is most likely which most likely means copy/pasting. AI can make errors, or "hallucinate", and it's up to you to figure out when it's a basic error.
Most of Ren'Py scripting is:
Speaker "Dialogue"

Just watch the tutorial, and rewrite it yourself in the correct way, and the errors will be gone. Helping yourself with AI is completely fine, but you need to at least have the basic knowledge to know when the AI is wrong, or gave you the right answer in the wrong format.

Ultimately, trust AI less, and improve yourself more.
Thnx for your guidance ;)
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
12,934
21,513
1,026
The problem is most likely which most likely means copy/pasting.
Yeah, my guess goes for menu indentation.

probably something like:
Python:
menu:
"choice 1":
[...]
"choice 2":
[...]
instead of:
Python:
label whatever:
    menu:
        "choice 1":
            [...]
        "choice 2":
            [...]
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
3,439
6,606
707
And if the suggestion to check the indentation does not help you find the issue, then paste the first 30 lines of your game script file here.

Please use the "[ code ] blah blah [ /code ]" formatting tags (and remove the spaces) so it preserves indentation for us to see.
 

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
2,014
3,732
353
Not only possible indentation issues, but each of those errors mention an expected statement and they highlight all the colons added after each line. If they are all menu choices, then you need to indent the action that happens after choosing that choice. Ren'py doesn't use tabs, every block is indented four spaces in. And like mentioned by osanaiko , it would help to show the code for these sections using this forum's built in CODE bbcode feature.

I also see an error on line 155. You use {partner_name} - those left and right brace characters are generally used for styling tags in Ren'py, not string variables, which normally use square brackets.

Example...

Python:
$ partner_name = "Marie"

menu:
    "Should I tell them?"
    "No, keep it private between you and [partner_name].":
        mc "I better not say anything. I already said too much."
        jump dont_tell
    "Yes, I should tell them":
        mc "I can't keep it a secret anymore... I am in a sexual relationship with your mother."
        jump game_over
My advice - Stop trying to learn via AI. AI's are often wrong. That's what happens when they get taught using basically everything on the internet. Garbage in = Garbage out.

Ren'py is a very forgiving and easy language to learn and there's tons of help and tutorials for it. Start with the built in tutorial project and then work from there.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
12,934
21,513
1,026
My advice - Stop trying to get learn via AI. AI's are often wrong. That's what happens when they get taught using basically everything on the internet. Garbage in = Garbage out.

Ren'py is a very forgiving and easy language to learn [...]
The first being strongly related to the second.

The easier the language is, and the more lax it's with the syntax, the less what an AI will give you will be accurate. Simply because the said AI do not understand that, will being working syntax, "this code", is an error, and that, in top, it can be mixed with, "this other code", that is also a working error, but not compatible with the first one.
And, in top of all this, Ren'Py is a compilation of three different languages (script, screen and animation/transform). Another thing that the AI will not understand since they are all mixed in the same code file, only differing by their declaration line.
 

AllNatural939

I am the bad guy?
Game Developer
Apr 3, 2024
921
1,148
229
The only way to write RenPy code is by doing it yourself. Or by using code from people who actually know what they’re doing — and in my experience, GTP ain’t one of those 'people'. GPT can help a lot with many things, but when it comes to RenPy, it's skyscraper-sized garbage.