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.
So I've started work on a game, and I have a menu. In this menu, you have three options. Every option should, theoretically, take you to the next scene.
Except it doesnt.
My script for this part looks like this:
menu:
"You watch it!":
a "Well, well well! Aren't we Miss Obnoxious today!"
$ asami_affinity -=1
m "What are you talking about? {i}You{/i} ran into {i}me!{/i}"
a "I don't have time for this! I'm gonna be late!"
m "Hey! Wait! Do you know where class 2-A is?"
a "Yeah, it's... *sigh* You're gonna get lost. Follow me."
jump classroom
"....":
a "Well...aren't you going to say anything?"
a "....."
a "....."
hide annoyed asami
show normal asami
a "No? Well. I'm gonna be late. See ya!"
m "Wait! Do you know where class 2-A is?"
a "Oh, are you in that class too?"
m "Yeah."
a "Super. My name's Asami! Let's be friends!"
jump classroom
"Sorry.":
hide annoyed asami
show happy asami
a "Hey, it's okay. Hey, what's your name?"
$ asami_affinity +=1
m "It's Mai. Mai Yamamoto. What's yours?"
hide happy asami
show genki asami
a "I'm Asami Matsuda! Where are you going, Miss Mai?"
m "I'm looking for class 2-A--"
hide genki asami
show happy asami
a "Heeey! I'm in that class too! It's this way."
hide happy asami
show asami freaking
"Omigosh, we're gonna be late! We need to hurrrrrry!"
jump classroom
label classroom:
The error log looks like this:
On line 66 of C:\Documents and Settings\Owner\Desktop\renpy-6.6.2-full\renpy-6.6.2\Struggle of the Orders/game/script.rpy: expected statement.
"....":
^
On line 80 of C:\Documents and Settings\Owner\Desktop\renpy-6.6.2-full\renpy-6.6.2\Struggle of the Orders/game/script.rpy: expected statement.
"Sorry.":
^
I'm a little confused here, because my menu worked fine until I tried to insert the jumps to the classroom scene.
mizgriz wrote:
I'm a little confused here, because my menu worked fine until I tried to insert the jumps to the classroom scene.
First thing to check - is the indentation for the 'jump' statements the same as the indentation for the line immediately previous?
(If you paste code, you should do it within 'code' tags rather than 'quote' tags, because then the indentation will be preserved, which is quite important with Python/Ren'Py script.)
When I went to fix it, it kept giving me the same error. Am I doing something wrong with the indentation? Too much? Not enough? Is it the menu? (The menu worked fine until I tried adding the "jumps"...) Hm.
menu:
"You watch it!":
a "Well, well well! Aren't we Miss Obnoxious today!"
$ asami_affinity -=1
m "What are you talking about? {i}You{/i} ran into {i}me!{/i}"
a "I don't have time for this! I'm gonna be late!"
m "Hey! Wait! Do you know where class 2-A is?"
a "Yeah, it's... *sigh* You're gonna get lost. Follow me."
jump classroom
"....":
hide annoyed asami
show sarcastic asami with fade
a "Well...aren't you going to say anything?"
a "....."
a "....."
hide sarcastic asami
show normal asami with fade
a "No? Well. I'm gonna be late. See ya!"
m "Wait! Do you know where class 2-A is?"
a "Oh, are you in that class too?"
m "Yeah."
a "Super. My name's Asami! Let's be friends!"
jump classroom
"Sorry.":
hide annoyed asami
show happy asami with fade
a "Hey, it's okay. Hey, what's your name?"
$ asami_affinity +=1
m "It's Mai. Mai Yamamoto. What's yours?"
hide happy asami
show genki asami with fade
a "I'm Asami Matsuda! Where are you going, Miss Mai?"
m "I'm looking for class 2-A--"
hide genki asami
show happy asami with fade
a "Heeey! I'm in that class too! It's this way."
hide happy asami
show asami freaking with fade
"Omigosh, we're gonna be late! We need to hurrrrrry!"
jump classroom
label classroom:
Look at the "You watch it!" choice - you don't have the same indentation (needs to look like the others). ...I think, but I'm not so good at this myself. *3*
Actually, it looks like "You watch it!" has the right number of spaces. :o Er, I mean, if it was in the right block... 4 spaces is an indentation/tab, right?
Anyway, monele is right. You have the indentations wrong. It should really look like this:
menu:
"You watch it!":
a "Well, well well! Aren't we Miss Obnoxious today!"
$ asami_affinity -=1
m "What are you talking about? {i}You{/i} ran into {i}me!{/i}"
a "I don't have time for this! I'm gonna be late!"
m "Hey! Wait! Do you know where class 2-A is?"
a "Yeah, it's... *sigh* You're gonna get lost. Follow me."
jump classroom
"....":
hide annoyed asami
show sarcastic asami with fade
a "Well...aren't you going to say anything?"
a "....."
a "....."
hide sarcastic asami
show normal asami with fade
a "No? Well. I'm gonna be late. See ya!"
m "Wait! Do you know where class 2-A is?"
a "Oh, are you in that class too?"
m "Yeah."
a "Super. My name's Asami! Let's be friends!"
jump classroom
"Sorry.":
hide annoyed asami
show happy asami with fade
a "Hey, it's okay. Hey, what's your name?"
$ asami_affinity +=1
m "It's Mai. Mai Yamamoto. What's yours?"
hide happy asami
show genki asami with fade
a "I'm Asami Matsuda! Where are you going, Miss Mai?"
m "I'm looking for class 2-A--"
hide genki asami
show happy asami with fade
a "Heeey! I'm in that class too! It's this way."
hide happy asami
show asami freaking with fade
"Omigosh, we're gonna be late! We need to hurrrrrry!"
jump classroom
label classroom:
I don't... really know how to explain it, but Jake explained it a bit in this thread. :D
Anyway, you should look more into indentation at: Thinking in Ren'Py. That's explains it~