To recap and rephrase some of replies already...
- Only specific statements lines end with a colon ( : )
Sometimes you've added them to lines like jump {label}:
. It'll generate errors.
It's not always obvious when you start out coding where colons belong. But you'll get there with experience.
So just keep an eye out for them and learn when they should be used (or not).
- Indentation matters... A LOT.
Generally speaking, if a line ends with a colon... the line(s) below it should be indented by 4 spaces.
Indentation only works when things line up. If you indent by 4, then indent again by 4... RenPy will be looking for that colon (and it won't find it).
Again, this is going to be an "experience" thing. Once you realize the patterns, you'll rarely make the same mistakes in the future.
return
doesn't end an indentation block.
I think you've seen return
used in a specific way and misinterpreted why.
Just "not" indenting the next line ends a block of code related to the colon above it. (So going left by 4 spaces).
At the level you're programming at right now, you probably want to avoid call
and return
. They have their uses, but based on the errors you're getting - I think trying to learn how to use them properly will just confuse matters. So for the moment think of return
as "end the game" and avoid all other uses.
call
and call screen
are two very different animals. So are show
and show screen
.
Continuing on from my previous point, part of the confusion around call
is because of it's similarity to call screen
. They are two completely different statements, doing two completely different things. If you try to relate one to the other or try to mix and match concepts related to each together... bad things will happen and you'll struggle to see why.
The same is true for show
and show screen
. show
puts an image onto the screen and leaves it there. show screen
puts a screen
onto the screen and leaves it there. Beginning to see where the confusion comes from? For the moment, ignore it all.
- Code will just continue from one
label
to another, unless you tell it otherwise.
The game doesn't stop or end just because it's reached the end of an indented block.
It looks to me like you tried to instead use
return
as an "this block of code ends here". (Nope).
However, what really happens is things just continue, one statement at a time, one line at a time.
So...
Python:
label start:
"*** The Start ***"
menu:
"Option 1"
jump my_label_one
"Option 2"
jump my_label_two
label my_label_one:
"You picked Option 1"
label my_label_two:
"You picked Option 2"
"*** THE END ***"
return
Will display "You picked Option 2" if you picked option 2... BUT... Will display both "You picked Option 1" AND "You picked Option 2" if you select option 1.
What you more likely would want is:
Python:
label start:
"*** The Start ***"
menu:
"Option 1"
jump my_label_one
"Option 2"
jump my_label_two
label my_label_one:
"You picked Option 1"
jump my_label_three
label my_label_two:
"You picked Option 2"
label my_label_three:
"*** THE END ***"
return
Hopefully it makes sense as to why.
One thing I will say is that none of the errors you've described are related to changes in how RenPy works. You said you're doing exactly the same as the tutorial videos... but weren't.
All the words were the same, but the indentations were different.
You'd added colons to lines that didn't need them and failed to add colons where they were required.
Sadly programming languages are pedantic and so those small differences led to the errors you were seeing.
The thing is, the code above it was coded correctly... So if I had to guess, you simply got frustrated and weren't as careful as you had been earlier. No worries... that's how we all learn.