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.
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 35: indentation mismatch.
Ren'Py Version: Ren'Py 7.4.0.1167
Sun Jan 17 20:53:03 2021
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 14: menu statement expects a non-empty block.
menu:
^
File "game/script.rpy", line 17: Line is indented, but the preceding one-line python statement statement does not expect a block. Please check this line's indentation.
if player_name == "":
^
Ren'Py Version: Ren'Py 7.4.0.1167
Sun Jan 17 21:04:58 2021
Indentation (some spaces at the beginning of a line of code) realy matters for Ren'Py.
Check an old, but useful explanaition (the other answers on that page are mostly out of date, so don't read them) - https://www.renpy.org/wiki/renpy/doc/FAQ (search for 'How does indentation work? What are blocks?').
The rule is simple - if you have a block of code the first line should ends with colon (:), other lines in that block should be extra indented and all that lines inside a block must have the same indentation (equal number of spaces at the beginning of the line).
Then, you'll be able to correct your code.
It looks like you don't need the line 'menu' at all, so just delete it.
Delete colon at the end of line with input - it doesn't need a block of code.
Make the same indentation for lines in blocks, like
Alex wrote: ↑Mon Jan 18, 2021 2:55 pm
Indentation (some spaces at the beginning of a line of code) realy matters for Ren'Py.
Check an old, but useful explanaition (the other answers on that page are mostly out of date, so don't read them) - https://www.renpy.org/wiki/renpy/doc/FAQ (search for 'How does indentation work? What are blocks?').
The rule is simple - if you have a block of code the first line should ends with colon (:), other lines in that block should be extra indented and all that lines inside a block must have the same indentation (equal number of spaces at the beginning of the line).
Then, you'll be able to correct your code.
It looks like you don't need the line 'menu' at all, so just delete it.
Delete colon at the end of line with input - it doesn't need a block of code.
Make the same indentation for lines in blocks, like