Indentation Mismatch, can’t find what is wrong.
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.
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.
- KyraNarwhals
- Newbie
- Posts: 21
- Joined: Fri Apr 20, 2018 5:33 pm
- Projects: Sylivia: The Land Unseen
- Tumblr: narwhalish
- Deviantart: SkyPuddleArts
- Github: KyraNarwhals
- Soundcloud: Narwhalish Gaming
- itch: Narwhalish
- Contact:
Indentation Mismatch, can’t find what is wrong.
It says I have an indentation mismatch and I’m so confused, here are the pictures.
https://gyazo.com/b05176a37e149e93fa0b62d494fbd180
https://gyazo.com/adc0c5a690be8a6e8b7f7fddf605eccd
(Links to pictures due to it being too big to just put the image here)
Please tell me what I did wrong and how to fix it ^^
Thanks!
https://gyazo.com/b05176a37e149e93fa0b62d494fbd180
https://gyazo.com/adc0c5a690be8a6e8b7f7fddf605eccd
(Links to pictures due to it being too big to just put the image here)
Please tell me what I did wrong and how to fix it ^^
Thanks!
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
maybe you need to make a jump label to that line 57, for continues label Like.
And make the line straight for line indention.
So the code keeps coming down here..
And make the line straight for line indention.
Code: Select all
"Draw a girl dancing":
$ Drawing2 = "Dancing"
"Blah blah"
jump continue1 <---- this is what i use commonly.
label continue1:
"blah blah"
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
Your indentation looks incorrect all over. Refer to the documentation for a proper example.
https://www.renpy.org/doc/html/language ... and-blocks
Line 52 and 56 are indented by one space too many. I think... Pictures are hard to count invisible spaces on. Code tag wrapped text is much preferred.
Use [co de][co de], without the spaces.
Line 57 has nothing 'wrong' with it, but the error is carrying over from the prior line error (on 52 or 56)
https://www.renpy.org/doc/html/language ... and-blocks
Code: Select all
label correct:
"some dialogue"
return
label incorrect:
"some dialogue"
return
Line 52 and 56 are indented by one space too many. I think... Pictures are hard to count invisible spaces on. Code tag wrapped text is much preferred.
Use [co de][co de], without the spaces.
Line 57 has nothing 'wrong' with it, but the error is carrying over from the prior line error (on 52 or 56)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
Hi, KyraNarwhals. When showing us a script, you can use one of the following methods:
1- Using your text editor, highlight the part of the script you want to show and copy it. When posting, on the window header under the subject field you will see several buttons. Click on the </> button to add the code tags to your post. Click between the code tags that were added to your post and paste your script there.
2 - If the script you are wanting to show is too big, then compress it to a zip file and load it as an attachment to your post.
This way, someone can test the script and/or make the modifications needed.
That said, check your script for indentation consistency. Use only four spaces when indenting. Avoid single spaces when starting a line.
1- Using your text editor, highlight the part of the script you want to show and copy it. When posting, on the window header under the subject field you will see several buttons. Click on the </> button to add the code tags to your post. Click between the code tags that were added to your post and paste your script there.
2 - If the script you are wanting to show is too big, then compress it to a zip file and load it as an attachment to your post.
This way, someone can test the script and/or make the modifications needed.
That said, check your script for indentation consistency. Use only four spaces when indenting. Avoid single spaces when starting a line.
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- KyraNarwhals
- Newbie
- Posts: 21
- Joined: Fri Apr 20, 2018 5:33 pm
- Projects: Sylivia: The Land Unseen
- Tumblr: narwhalish
- Deviantart: SkyPuddleArts
- Github: KyraNarwhals
- Soundcloud: Narwhalish Gaming
- itch: Narwhalish
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
Imperf3kt wrote: ↑Tue Mar 05, 2019 1:41 am Your indentation looks incorrect all over. Refer to the documentation for a proper example.
https://www.renpy.org/doc/html/language ... and-blocksCode: Select all
label correct: "some dialogue" return label incorrect: "some dialogue" return
Line 52 and 56 are indented by one space too many. I think... Pictures are hard to count invisible spaces on. Code tag wrapped text is much preferred.
Use [co de][co de], without the spaces.
Line 57 has nothing 'wrong' with it, but the error is carrying over from the prior line error (on 52 or 56)
I’ll grab that when I get home today, though that document you sent makes no sense to me.
- KyraNarwhals
- Newbie
- Posts: 21
- Joined: Fri Apr 20, 2018 5:33 pm
- Projects: Sylivia: The Land Unseen
- Tumblr: narwhalish
- Deviantart: SkyPuddleArts
- Github: KyraNarwhals
- Soundcloud: Narwhalish Gaming
- itch: Narwhalish
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
Imperf3kt wrote: ↑Tue Mar 05, 2019 1:41 am Your indentation looks incorrect all over. Refer to the documentation for a proper example.
https://www.renpy.org/doc/html/language ... and-blocksCode: Select all
label correct: "some dialogue" return label incorrect: "some dialogue" return
Line 52 and 56 are indented by one space too many. I think... Pictures are hard to count invisible spaces on. Code tag wrapped text is much preferred.
Use [co de][co de], without the spaces.
Line 57 has nothing 'wrong' with it, but the error is carrying over from the prior line error (on 52 or 56)
Code: Select all
"What will Leila sketch?"
menu:
"Draw Flowers":
$ Drawing1 = "Flowers"
"Leila starts to sketch out a picture of the sunflower field she sits in. She feels the small breeze blow her hair around behind her."
"Draw a Girl Dancing":
$ Drawing2 = "Dancing"
"Leila outlines a girl dancing in the springtime. When all of the flowers bloom. She smiles and wishes she could have the markers to color this."
"After Leila finishes her sketch, she closes the sketchbook and puts it away in her bag. She lats down in her bag. She lays down in the field, looking up at the clear blue sky. Drawing in the fields was always her way of escaping her harsh reality. It calmed her on nights such as these."
show leila happy
l "Sometimes, I wish I could leave this place. Be somewhere, where I can truly be happy, just like these sunflowers."
"She wishes her live to be as bright as these sunflowers, to spring up full of spirit and liveliness. Under the beautiful starry skies, she closes her eyes."
show black
with dissolve
"She felt a ray of light gleam on her eyelids. As she slowly opens her eyes and stands up to see where the light source is coming from, Leila noticed it was sunrise"
show leila normal worried
"A pang of anxiety had overcome her. She knew her dad would come to knock on her door in the morning. Moving as fast as she could, she grabbed her bag and bolted to the ladder and climbed through her window. Sweating and panting, she was finally home safe and sound."
"Or that's what she thought. She was her dad standing in front of the door with a frighting glare."
"What Should Leila Say?"
menu:
"Make an excuse":
$ Excuse = "Excuse"
l "I need to get my backpack, but I left it on the porch and didn't want to disturb you by going through the front door."
f "You don't think I've noticed that your're wearing the same clothes right now?"
l "I didn't bother to change!"
f "Lying's not going to get you anyhere!"
"Tell The Truth":
$Truth = "Truth"
l "I was sleeping in the sunflower fields..."
f "What makes you think it's ok to leave without my permission?"
l "No, Father! I just wanted.. to have some fresh air!"
"Stay Silent":
$ Silent = "Silent"
l "..."
f "I'm going to have to teach you another lessosn."
l "Wait! Please, Father, I haven't done anything wrong!"
f "There are no excuses for what you were doing."
"The father grabs Leila by the hair and drags her across the hallway. He throws her down stairs and furiosuly stomps towards her."
show leila crying
Re: Indentation Mismatch, can’t find what is wrong.
....menu: #4
........"1var":#8
............"text"#12
........"2var":#8
............"text"#12
...."text"#4
........"1var":#8
............"text"#12
........"2var":#8
............"text"#12
...."text"#4
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
- KyraNarwhals
- Newbie
- Posts: 21
- Joined: Fri Apr 20, 2018 5:33 pm
- Projects: Sylivia: The Land Unseen
- Tumblr: narwhalish
- Deviantart: SkyPuddleArts
- Github: KyraNarwhals
- Soundcloud: Narwhalish Gaming
- itch: Narwhalish
- Contact:
- Sunlit-Dreamer
- Veteran
- Posts: 400
- Joined: Thu Sep 22, 2011 12:41 am
- Completed: NaNo2015 Bedtime, NaNo2016 The Doll and the Spider, NaNo2017 What's Your Name?, NaNo2018 Painting Your Skin, NaNo2019 Home's Embrace, NaNo2020 Molly
- Projects: NaNo2021 Cracked Moonstone
- Deviantart: Sunlit-Dreamer
- itch: Sunlit-Dreamer
- Location: Lala land~
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
The answer is actually very simple. You've added unnecessary spaces to the narrated lines.
Example:
Right
Wrong
You want your code to "line up" in straight lines whenever you indent.
Here, I fixed it up for you.
Example:
Right
Code: Select all
"Blah blah blah."
m "Blahdy blah."
Code: Select all
"Blah blah blah."
m "Blahdy blah."
Here, I fixed it up for you.
Code: Select all
"What will Leila sketch?"
menu:
"Draw Flowers":
$ Drawing1 = "Flowers"
"Leila starts to sketch out a picture of the sunflower field she sits in. She feels the small breeze blow her hair around behind her."
"Draw a Girl Dancing":
$ Drawing2 = "Dancing"
"Leila outlines a girl dancing in the springtime. When all of the flowers bloom. She smiles and wishes she could have the markers to color this."
"After Leila finishes her sketch, she closes the sketchbook and puts it away in her bag. She lats down in her bag. She lays down in the field, looking up at the clear blue sky. Drawing in the fields was always her way of escaping her harsh reality. It calmed her on nights such as these."
show leila happy
l "Sometimes, I wish I could leave this place. Be somewhere, where I can truly be happy, just like these sunflowers."
"She wishes her life to be as bright as these sunflowers, to spring up full of spirit and liveliness. Under the beautiful starry skies, she closes her eyes."
show black
with dissolve
"She felt a ray of light gleam on her eyelids. As she slowly opens her eyes and stands up to see where the light source is coming from, Leila noticed it was sunrise."
show leila normal worried
"A pang of anxiety had overcome her. She knew her dad would come to knock on her door in the morning. Moving as fast as she could, she grabbed her bag and bolted to the ladder and climbed through her window. Sweating and panting, she was finally home safe and sound."
"Or that's what she thought. She saw her dad standing in front of the door with a frightening glare."
"What Should Leila Say?"
menu:
"Make an excuse":
$ Excuse = "Excuse"
l "I need to get my backpack, but I left it on the porch and didn't want to disturb you by going through the front door."
f "You don't think I've noticed that your're wearing the same clothes right now?"
l "I didn't bother to change!"
f "Lying's not going to get you anyhere!"
"Tell The Truth":
$Truth = "Truth"
l "I was sleeping in the sunflower fields..."
f "What makes you think it's ok to leave without my permission?"
l "No, Father! I just wanted.. to have some fresh air!"
"Stay Silent":
$ Silent = "Silent"
l "..."
f "I'm going to have to teach you another lessosn."
l "Wait! Please, Father, I haven't done anything wrong!"
f "There are no excuses for what you were doing."
"The father grabs Leila by the hair and drags her across the hallway. He throws her down stairs and furiously stomps towards her."
show leila crying
- KyraNarwhals
- Newbie
- Posts: 21
- Joined: Fri Apr 20, 2018 5:33 pm
- Projects: Sylivia: The Land Unseen
- Tumblr: narwhalish
- Deviantart: SkyPuddleArts
- Github: KyraNarwhals
- Soundcloud: Narwhalish Gaming
- itch: Narwhalish
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
Thank you so much! That solved the issue!Sunlit-Dreamer wrote: ↑Tue Mar 05, 2019 7:28 pm The answer is actually very simple. You've added unnecessary spaces to the narrated lines.
Example:
RightWrongCode: Select all
"Blah blah blah." m "Blahdy blah."
You want your code to "line up" in straight lines whenever you indent.Code: Select all
"Blah blah blah." m "Blahdy blah."
Here, I fixed it up for you.
Code: Select all
"What will Leila sketch?" menu: "Draw Flowers": $ Drawing1 = "Flowers" "Leila starts to sketch out a picture of the sunflower field she sits in. She feels the small breeze blow her hair around behind her." "Draw a Girl Dancing": $ Drawing2 = "Dancing" "Leila outlines a girl dancing in the springtime. When all of the flowers bloom. She smiles and wishes she could have the markers to color this." "After Leila finishes her sketch, she closes the sketchbook and puts it away in her bag. She lats down in her bag. She lays down in the field, looking up at the clear blue sky. Drawing in the fields was always her way of escaping her harsh reality. It calmed her on nights such as these." show leila happy l "Sometimes, I wish I could leave this place. Be somewhere, where I can truly be happy, just like these sunflowers." "She wishes her life to be as bright as these sunflowers, to spring up full of spirit and liveliness. Under the beautiful starry skies, she closes her eyes." show black with dissolve "She felt a ray of light gleam on her eyelids. As she slowly opens her eyes and stands up to see where the light source is coming from, Leila noticed it was sunrise." show leila normal worried "A pang of anxiety had overcome her. She knew her dad would come to knock on her door in the morning. Moving as fast as she could, she grabbed her bag and bolted to the ladder and climbed through her window. Sweating and panting, she was finally home safe and sound." "Or that's what she thought. She saw her dad standing in front of the door with a frightening glare." "What Should Leila Say?" menu: "Make an excuse": $ Excuse = "Excuse" l "I need to get my backpack, but I left it on the porch and didn't want to disturb you by going through the front door." f "You don't think I've noticed that your're wearing the same clothes right now?" l "I didn't bother to change!" f "Lying's not going to get you anyhere!" "Tell The Truth": $Truth = "Truth" l "I was sleeping in the sunflower fields..." f "What makes you think it's ok to leave without my permission?" l "No, Father! I just wanted.. to have some fresh air!" "Stay Silent": $ Silent = "Silent" l "..." f "I'm going to have to teach you another lessosn." l "Wait! Please, Father, I haven't done anything wrong!" f "There are no excuses for what you were doing." "The father grabs Leila by the hair and drags her across the hallway. He throws her down stairs and furiously stomps towards her." show leila crying
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
You should consider indenting everything one further time.
The only thing that goes all the way to the left should be your labels. Everything inside of those is part of a new block so should not be on the same line.
The only thing that goes all the way to the left should be your labels. Everything inside of those is part of a new block so should not be on the same line.
Imperf3kt wrote: ↑Tue Mar 05, 2019 1:41 amCode: Select all
label correct: "some dialogue" return label incorrect: "some dialogue" return
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- KyraNarwhals
- Newbie
- Posts: 21
- Joined: Fri Apr 20, 2018 5:33 pm
- Projects: Sylivia: The Land Unseen
- Tumblr: narwhalish
- Deviantart: SkyPuddleArts
- Github: KyraNarwhals
- Soundcloud: Narwhalish Gaming
- itch: Narwhalish
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
I’m very confused what you mean, I’ve never seen the return thing in my research.Imperf3kt wrote: ↑Tue Mar 05, 2019 8:15 pm You should consider indenting everything one further time.
The only thing that goes all the way to the left should be your labels. Everything inside of those is part of a new block so should not be on the same line.
Imperf3kt wrote: ↑Tue Mar 05, 2019 1:41 amCode: Select all
label correct: "some dialogue" return label incorrect: "some dialogue" return
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Indentation Mismatch, can’t find what is wrong.
return is what ends your game or returns to a label you previously "called" from.
It is irrelevant to indentation.
https://www.renpy.org/doc/html/label.ht ... -statement
This is also explained, albeit briefly, in every new script.rpy file Ren'Py creates.
Be careful not to confuse it with Return() or _return
It is irrelevant to indentation.
https://www.renpy.org/doc/html/label.ht ... -statement
This is also explained, albeit briefly, in every new script.rpy file Ren'Py creates.
Be careful not to confuse it with Return() or _return
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: No registered users