CAN'T DO ANOTHER PASSAGE!

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
hikarihanazono
Newbie
Posts: 7
Joined: Mon Apr 11, 2011 9:13 pm
Contact:

CAN'T DO ANOTHER PASSAGE!

#1 Post by hikarihanazono » Sat Apr 16, 2011 12:55 pm

Well, the title is all messed up. Anyways, here's the thing. I tried getting my game to work, but then as i launched it, it says:
====
On line 36 of C:\Users\Karen\.jedit\Idiots Guide/game/script.rpy: expected menuitem
jump school
^
====
And the label thing is the same "school"! Do you think it's because I have to many routes? I have four, and those don't show errors, just this one! Help?

User avatar
Alex
Lemma-Class Veteran
Posts: 2515
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#2 Post by Alex » Sat Apr 16, 2011 2:27 pm

Check your script befor line 36...

Code: Select all

menu:
    "a menuitem":   # <--- didn't you miss it at all or colon at the end of line?
        jump school

hikarihanazono
Newbie
Posts: 7
Joined: Mon Apr 11, 2011 9:13 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#3 Post by hikarihanazono » Sun Apr 17, 2011 4:19 am

=========
h "Well, what should we do?"
menu:
"Head to the Intermediate School!"
jump school

"Let's go eat something!"
jump eat

"Let's go to someone's house"
jump house

"Let's stay for tutoring"
jump tutor
label school:
j "I say we go to the school who's with me?"
label eat:
l "Man, am I hungry...who says we should eat?"
label house:
e "Well, how about go blow stuff up at someone's house"
label tutor:
h "I know this might sound weird, but I say we should stay for tutoring."
=====
That's whats going on, but i always get the message, im not really understanding you, Alex.

User avatar
Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#4 Post by Blue Lemma » Sun Apr 17, 2011 5:49 am

I'm pretty sure he's right, it should be:

Code: Select all

"Head to the Intermediate School!":
instead of

Code: Select all

"Head to the Intermediate School!"
(you need a colon on the end of your menu choices)
“Among those who dislike oppression are many who like to oppress.”
- Napoleon Bonaparte


I've retired from forum administration. I do not add people to the "adult" group, deactivate accounts, nor any other administrative task. Please direct admin/mod issues to PyTom or the other mods : )

User avatar
Alex
Lemma-Class Veteran
Posts: 2515
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#5 Post by Alex » Sun Apr 17, 2011 11:36 am

Oh, Blue Lemma has already answered you...))

You can read some more explanations here
http://www.renpy.org/wiki/renpy/doc/tut ... _and_Jumps
http://www.renpy.org/wiki/renpy/FAQ#How ... _blocks.3F
Also, you can use "Code" button when you need to post some code (press it and put your code between [ code] and [ /code] tags).

hikarihanazono
Newbie
Posts: 7
Joined: Mon Apr 11, 2011 9:13 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#6 Post by hikarihanazono » Sun Apr 17, 2011 3:45 pm

^ Thank you~ Since I am just a newbie :D
But even if i do the colon, instead, something else happens.

Code: Select all

On line 35 of C:\Users\Karen\.jedit\Idiots Guide/game/script.rpy: choice menuitem expects a non-empty block.
"Head to the Intermediate School!":
                                   ^

User avatar
Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#7 Post by Blue Lemma » Sun Apr 17, 2011 7:17 pm

You need to have something after that. For instance,

Code: Select all

"Head to the Intermediate School!":
    jump school
Note the indentation [4 spaces] on the jump school line. That needs to be there.

Edit: For reference, here is how the script from "menu" on should look (with indentations):

Code: Select all

menu:
    "Head to the Intermediate School!":
        jump school

    "Let's go eat something!":
        jump eat

    "Let's go to someone's house":
        jump house

    "Let's stay for tutoring":
        jump tutor
label school:
    j "I say we go to the school who's with me?"
label eat:
    l "Man, am I hungry...who says we should eat?"
label house:
    e "Well, how about go blow stuff up at someone's house"
label tutor:
    h "I know this might sound weird, but I say we should stay for tutoring."
http://www.renpy.org/doc/html/language_ ... and-blocks
“Among those who dislike oppression are many who like to oppress.”
- Napoleon Bonaparte


I've retired from forum administration. I do not add people to the "adult" group, deactivate accounts, nor any other administrative task. Please direct admin/mod issues to PyTom or the other mods : )

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#8 Post by Aleema » Sun Apr 17, 2011 7:20 pm

Code: Select all

h "Well, what should we do?"

menu:
    "Head to the Intermediate School!":
        jump school
    
    "Let's go eat something!":
        jump eat
    
    "Let's go to someone's house":
        jump house
    
    "Let's stay for tutoring":
        jump tutor

label school:
j "I say we go to the school who's with me?"
label eat:
l "Man, am I hungry...who says we should eat?"
label house:
e "Well, how about go blow stuff up at someone's house"
label tutor:
h "I know this might sound weird, but I say we should stay for tutoring."
^That's what they're talking about. Indentation is VERY important to this coding language. Your first error, however, is because you didn't have a colon (:) after your 4 menu choices.

hikarihanazono
Newbie
Posts: 7
Joined: Mon Apr 11, 2011 9:13 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#9 Post by hikarihanazono » Mon Apr 18, 2011 1:28 am

Code: Select all

 On line 92 of C:\Users\Karen\.jedit\Idiots Guide/game/script.rpy: indentation mismatch. 
And this is the script:

Code: Select all

92    menu:
93        "Ever's House":
94           jump ever
95     label ever:
96        "Lexi's House":
97            jump lexi
98     label lexi:
99        "Hikari's House":
100            jump hikari
101     label hikari:
102        "Josh's House":
103            jump josh
104     label josh: 

User avatar
Alex
Lemma-Class Veteran
Posts: 2515
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#10 Post by Alex » Mon Apr 18, 2011 7:53 am

As error message says: "indentation mismatch". That means, that you use all that spaces wrong. Read a good explanation of how indentation works and what blocks are in second link I gave you.
And after all, your code should looks like Blue Lemma and Aleema told

Code: Select all

    menu:          # have some spaces, because it belongs to a label
        "Ever's House":        # have additional spaces, because it belongs to menu block
            jump ever        # have some more spaces, because it belongs to menuitem "Ever's House"

        "Lexi's House":
            jump lexi

        "Hikari's House":
            jump hikari

        "Josh's House":
            jump josh

label ever: # labels itself don't need any indentation 
    "So, we jumped to label ever... what's next?"
    # some more code

label lexi:
    "So, we jumped to label lexi... what's next?"
    # some more code
You don't need to use <label> statement inside menu. Jump <label_name> tells Ren'py to jump to that label, and label itself can be placed in any other part of your code.
Last edited by Alex on Tue Apr 19, 2011 4:32 am, edited 1 time in total.

User avatar
Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#11 Post by Blue Lemma » Mon Apr 18, 2011 4:45 pm

All the indentation spaces come in groups of 4 (I think some lines are off by 1 space up there)
“Among those who dislike oppression are many who like to oppress.”
- Napoleon Bonaparte


I've retired from forum administration. I do not add people to the "adult" group, deactivate accounts, nor any other administrative task. Please direct admin/mod issues to PyTom or the other mods : )

User avatar
KimiYoriBaka
Miko-Class Veteran
Posts: 636
Joined: Thu May 14, 2009 8:15 pm
Projects: Castle of Arhannia
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#12 Post by KimiYoriBaka » Mon Apr 18, 2011 10:54 pm

All the indentation spaces come in groups of 4 (I think some lines are off by 1 space up there)
the 4 space rule is only preferred by the python community. it's not mandatory as long as items in the same block are all aligned.

renpy returned the error "indentation mismatch" because that's the what it noticed (compilers and interpreters report all the errors, even if it's redundant to do so). the main problem was just the labels not needing to be inside the menu at all (besides being misused).

hikarihanazono
Newbie
Posts: 7
Joined: Mon Apr 11, 2011 9:13 pm
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#13 Post by hikarihanazono » Tue Apr 19, 2011 10:57 pm

and now this!!! wtf?

Code: Select all

On line 88 of C:\Users\Karen\.jedit\Idiots Guide/game/script.rpy: say statement does not expect a block. Please check the indentation of the line after this one.
l "So then...who's house?"

User avatar
Ellume
Regular
Posts: 36
Joined: Tue Apr 06, 2010 2:57 am
Contact:

Re: CAN'T DO ANOTHER PASSAGE!

#14 Post by Ellume » Wed Apr 20, 2011 12:07 am

Did you maybe indent too far? As stated before everything for a block needs to be at the same indentation. Maybe read over the Indentation and Blocks Section of the Ren'Py Language Basics.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Dsiak