"Jump" headaches

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.
Post Reply
Message
Author
mizgriz
Newbie
Posts: 4
Joined: Mon May 19, 2008 6:43 pm
Contact:

"Jump" headaches

#1 Post by mizgriz »

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.

Thanks for your help!

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: "Jump" headaches

#2 Post by Jake »

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.)
Server error: user 'Jake' not found

Guest

Re: "Jump" headaches

#3 Post by Guest »

The indentation is the same, yes.

(Sorry! Will remember that for next time!)

mizgriz
Newbie
Posts: 4
Joined: Mon May 19, 2008 6:43 pm
Contact:

Re: "Jump" headaches

#4 Post by mizgriz »

That was me.

EDIT: Tweaked it again. Still having some issues. It seems to be a problem with the menu more than anything. I've included the error log.
Attachments
errors.txt
Errorlog
(479 Bytes) Downloaded 105 times

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: "Jump" headaches

#5 Post by monele »

Code: Select all

"Sorry.":
    hide annoyed asami
    show happy asami
and not

Code: Select all

"Sorry.":
hide annoyed asami
show happy asami
The way it is, it's interpreted as if there's nothing happening after the "Sorry." choice.

mizgriz
Newbie
Posts: 4
Joined: Mon May 19, 2008 6:43 pm
Contact:

Re: "Jump" headaches

#6 Post by mizgriz »

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.

Here's what my menu looks like:

Code: Select all

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:    

Spiralbunny
Regular
Posts: 43
Joined: Thu Mar 06, 2008 3:11 am
Location: Europe
Contact:

Re: "Jump" headaches

#7 Post by Spiralbunny »

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*

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: "Jump" headaches

#8 Post by monele »

Indentation = 4 spaces

Here I see a mix of a single space and then 8 spaces or so. That's what you need to fix :)

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: "Jump" headaches

#9 Post by akemicchi »

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:

Code: Select all

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~

mizgriz
Newbie
Posts: 4
Joined: Mon May 19, 2008 6:43 pm
Contact:

Re: "Jump" headaches

#10 Post by mizgriz »

That solved it! Thanks a bunch. :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]