Ren'Py renpy issue

Niv-Mizzet the Firemind

Active Member
Mar 15, 2020
571
1,109
The labels start at the 4th tab, maybe that's what's causing the issue.
Python:
label start:
    define d = Character("dick")
    
    scene gail
    "hello cunts"
    menu:
        "what do you wanna do?"
        "eat shit":
            d "h"
    jump home
    
label home:
    d "h"
Try this and see if it works.
 

javikaston

Well-Known Member
Game Developer
Oct 25, 2019
1,325
1,749
it did work what was the issue and i how do i fix it when it tell me; expected statement ?
 

moskyx

Engaged Member
Jun 17, 2019
3,969
12,775
How indentation works is like the very first thing you should learn when coding in Ren'py. Seriously. Just take a look at the original code you used as example, then look at the solution provided and now look at what you had written at first. You can't just write your code wherever you want, there are rules to observe regarding those four-spacebar blanks. Basically, after each : sign, next lines should start 4 spaces to the right, until that "block" ends
 
  • Like
Reactions: Baka plays

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,302
15,172
The labels start at the 4th tab, maybe that's what's causing the issue.
Except that, as weird as his code is, I tried it at home, and it works without problems (Ren'py 7.4.4 and 7.4.8). I would add that there's no reason for it to not works. Therefore I guess that he used a version of Ren'py that is bugged (7.4.7 ?) ; there's many small issues during the port to Python 3.x

There's also the "problem" of the define that shouldn't be indented, nor put in a label.


How indentation works is like the very first thing you should learn when coding in Ren'py. Seriously. Just take a look at the original code you used as example, [...]
Or at the " " section of the documentation:
"Note that all the say statements are indented by four spaces. This is because they are a block underneath the label statement. In Ren'Py, blocks must be indented relative to the prior statement, and all of the statements in a block must be indented by the same amount. "
 

javikaston

Well-Known Member
Game Developer
Oct 25, 2019
1,325
1,749
I have renpy 7.4.8 and copied the tutorial code. exactly how they showed it.or at least that would it looked like to me. either way, thank you