End of line expected error, plz help!

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
sitdown411
Newbie
Posts: 4
Joined: Sat Feb 17, 2018 11:49 pm
Contact:

End of line expected error, plz help!

#1 Post by sitdown411 »

Hey guys,
I'm super new to Ren'Py. Creating a basic mystery detective game for a class I'm in. I followed a few tutorials and thought I was making a pretty basic game without any issues. However when I go to launch it just seems like error after error. Especially "end of line expected" on all of my menu choices. Any help would be greatly appreciated. Idk if theres a better way to post the code other than just copy and paste
# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

define D = Character("Dispatch")
define R = Character("Ramirez")
define G = Character("Guard")
define Y = Character("You")
define O = Character("Officer Jones")


# The game starts here.

label start:

# These display lines of dialogue.

"Your a first year detective for the LAPD. You spent two years prior in the department as a police officer.
You make a decent living, have a girlfriend, and your new partner is one of your closest friends. You work 5
days a week and your two days off alternate. Life is simple. As an officer, you've never had anything crazy
happen. Some would say that's boring, but you just think it's lucky. The less action the better. After all it's
a dangerous job to have. But that all changed when the call came in. Different answers, areas, and clues will lead
to different information. Make smart choices and good luck."

D " Unit 62, unit 62, possible 187 in Meadow Ridge, compound 1682 Northridge, can you respond?"

"The car goes silent. You and your partner never imagined even hearing a possible homicide situation on the first
week."

R "'clears throat..' Unit 62 responding and in route. Wow, First time for everything I guess."

menu:

Y "Yeah, I'm feeling pretty nervous now.":
jump R1

Y "What do you think happened?":
jump R2

label R1:
R "Well try not to be. This is huge for us. Everyone in the department is probably thinking we can't
handle this. We gotta stay sharp. The neighborhood is coming up."

label R2:
R "No clue. I've been on this side before. Meadow Ridge is probably one of the richest neighborhoods
in the state. And I'm guessing our victim is somebody important."

"You pull up to the gate of the neighborhood. Big white pillars on both sides, flowers
and plants everywhere, with a black gate, golden MR in the center. There's a security guard."

G "Was wondering when you would get here, first officers and paramedics rolled through about
five minutes ago. But looks like your the first detectives on the scene."

menu:
Y "What have you heard?":
jump G1

Y "Just let us through please.":
jump G2



label G1:
G "Not too sure. Their saying Mr. Johnson was in some kind of accident. Its the first house on the right after
that first left."

label G2:
G "Well alright. Its the first house on the right after that first left."

"The gate opens and you pull through. The houses are massive. There is a crowd of neighbors outside the house
an ambulance, and two squad cars. You step out of the vehicle and the officers brief you."

R "What's the situation officer."

O "Wife called this morning, said she came home with breakfast and found Mr. Johnson in the shower bleeding
from the head and unresponsive. Blood on the bath faucet, looking like he slipped. Paramedics pronounced
him dead upon arrival, severe head trauma."

R "Any witnesses?"

O "Well theres the wife Sharon who found him. Theres also the housekeeper, the poolboy, and a neighborhood
who was passing by. There still giving their statements in the front entrance."

menu:
Y "Let's get in there.":
jump frontdoor

Y "And what do we know about Johnson?":
jump john

label john:
O "The guys bigtime at some lawfirm. Probably could of retired ten years ago but loves to work.
Goes in every day of the week at 9:00AM. Divorced two times, no kids. Met his wife about a year
ago through mutual friends. They were married in two months. Wife says he was about to close the case
of the decade and become partner. Lot of people would of been sent to prison if it went through."

menu:
Y "Sounds like someone had a motif to get rid of this guy.":
jump R3

Y "Poor bastard.":
jump frontdoor

label R3:
R "You really thinking someone killed the guy?"

menu:
Y "I'm not sure.":
jump frontdoor
Y "Definitely possible.":
jump frontdoor

label frontdoor:
"You and Ramirez step into the front entrance."

menu homepage:
"You want to find out about the witnesses first to get a better idea of what's going on.":
jump witness

"You'll get to the witnessees after. You want to check out the house as soon as possible.":
jump house








# This ends the game.

return

sitdown411
Newbie
Posts: 4
Joined: Sat Feb 17, 2018 11:49 pm
Contact:

Re: End of line expected error, plz help!

#2 Post by sitdown411 »

The code isn't arranged like that, I just copy and pasted it. Is there another way to post code that's more accurate?

User avatar
LateWhiteRabbit
Eileen-Class Veteran
Posts: 1867
Joined: Sat Jan 19, 2008 2:47 pm
Projects: The Space Between
Contact:

Re: End of line expected error, plz help!

#3 Post by LateWhiteRabbit »

sitdown411 wrote: Sun Feb 18, 2018 12:02 am The code isn't arranged like that, I just copy and pasted it. Is there another way to post code that's more accurate?
You want to post code inside code brackets, like so:

Code: Select all

Your code goes here.
Posting in code brackets is important because white space and indents are vital for Python and RenPy code to work properly. So if your mistake is because of indents, no one will be able to tell unless you use code brackets.

sitdown411
Newbie
Posts: 4
Joined: Sat Feb 17, 2018 11:49 pm
Contact:

Re: End of line expected error, plz help!

#4 Post by sitdown411 »

Code: Select all

# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

define D = Character("Dispatch")
define R = Character("Ramirez")
define G = Character("Guard")
define Y = Character("You")
define O = Character("Officer Jones")


# The game starts here.

label start:

        # These display lines of dialogue.

      "Your a first year detective for the LAPD. You spent two years prior in the department as a police officer.
       You make a decent living, have a girlfriend, and your new partner is one of your closest friends. You work 5 
       days a week and your two days off alternate. Life is simple. As an officer, you've never had anything crazy
       happen. Some would say that's boring, but you just think it's lucky. The less action the better. After all it's
       a dangerous job to have. But that all changed when the call came in. Different answers, areas, and clues will lead
       to different information. Make smart choices and good luck."
      
      D " Unit 62, unit 62, possible 187 in Meadow Ridge, compound 1682 Northridge, can you respond?"
      
      "The car goes silent. You and your partner never imagined even hearing a possible homicide situation on the first
       week."
      
      R "'clears throat..' Unit 62 responding and in route. Wow, First time for everything I guess."
      
      menu:
          
          Y "Yeah, I'm feeling pretty nervous now.":
              jump R1
              
          Y "What do you think happened?":
              jump R2
              
      label R1:
                R "Well try not to be. This is huge for us. Everyone in the department is probably thinking we can't
                   handle this. We gotta stay sharp. The neighborhood is coming up."
                
      label R2:
                    R "No clue. I've been on this side before. Meadow Ridge is probably one of the richest neighborhoods
                       in the state. And I'm guessing our victim is somebody important."
                    
                    "You pull up to the gate of the neighborhood. Big white pillars on both sides, flowers
                     and plants everywhere, with a black gate, golden MR in the center. There's a security guard."
                    
                    G "Was wondering when you would get here, first officers and paramedics rolled through about
                       five minutes ago. But looks like your the first detectives on the scene."
                    
                    menu:
                        Y "What have you heard?":
                                jump G1
            
                        Y "Just let us through please.":
                                jump G2
                
                    
                
                    label G1:
                              G "Not too sure. Their saying Mr. Johnson was in some kind of accident. Its the first house on the right after
               that first left."
            
                    label G2:
                              G "Well alright. Its the first house on the right after that first left."
            
                    "The gate opens and you pull through. The houses are massive. There is a crowd of neighbors outside the house
             an ambulance, and two squad cars. You step out of the vehicle and the officers brief you."
            
                    R "What's the situation officer."
            
                    O "Wife called this morning, said she came home with breakfast and found Mr. Johnson in the shower bleeding
               from the head and unresponsive. Blood on the bath faucet, looking like he slipped. Paramedics pronounced
               him dead upon arrival, severe head trauma."
            
                    R "Any witnesses?"
            
                    O "Well theres the wife Sharon who found him. Theres also the housekeeper, the poolboy, and a neighborhood
               who was passing by. There still giving their statements in the front entrance."
            
                    menu:
                        Y "Let's get in there.":
                            jump frontdoor
                
                        Y "And what do we know about Johnson?":
                            jump john
             
                    label john:
                                O "The guys bigtime at some lawfirm. Probably could of retired ten years ago but loves to work.
                    Goes in every day of the week at 9:00AM. Divorced two times, no kids. Met his wife about a year
                    ago through mutual friends. They were married in two months. Wife says he was about to close the case
                    of the decade and become partner. Lot of people would of been sent to prison if it went through."
                 
                    menu:
                        Y "Sounds like someone had a motif to get rid of this guy.":
                         jump R3
                     
                        Y "Poor bastard.":
                         jump frontdoor
                         
                    label R3:
                                R "You really thinking someone killed the guy?"
                 
                    menu:
                        Y "I'm not sure.":
                         jump frontdoor
                        Y "Definitely possible.":
                         jump frontdoor
                         
                    label frontdoor:
                               "You and Ramirez step into the front entrance."
                 
                    menu homepage:
                                "You want to find out about the witnesses first to get a better idea of what's going on.":
                                    jump witness
                         
                                "You'll get to the witnessees after. You want to check out the house as soon as possible.":
                                    jump house
                 
                 
     
                     
     
     

    
     # This ends the game.

return







User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: End of line expected error, plz help!

#5 Post by IrinaLazareva »

Names of the Сharacter() is not allowed in the menu lines.

instead of:

Code: Select all

      menu:
          
          Y "Yeah, I'm feeling pretty nervous now.":   #<<<<!
              jump R1
              
          Y "What do you think happened?":              #<<<<!
              jump R2
You can only :

Code: Select all

      menu:
          
          "Yeah, I'm feeling pretty nervous now.":
              jump R1
              
          "What do you think happened?":
              jump R2
or

Code: Select all

      menu:
          Y "..."
          "Yeah, I'm feeling pretty nervous now.":
              jump R1
              
          "What do you think happened?":
              jump R2

sitdown411
Newbie
Posts: 4
Joined: Sat Feb 17, 2018 11:49 pm
Contact:

Re: End of line expected error, plz help!

#6 Post by sitdown411 »

IrinaLazareva wrote: Sun Feb 18, 2018 3:40 am Names of the Сharacter() is not allowed in the menu lines.

instead of:

Code: Select all

      menu:
          
          Y "Yeah, I'm feeling pretty nervous now.":   #<<<<!
              jump R1
              
          Y "What do you think happened?":              #<<<<!
              jump R2
You can only :

Code: Select all

      menu:
          
          "Yeah, I'm feeling pretty nervous now.":
              jump R1
              
          "What do you think happened?":
              jump R2
or

Code: Select all

      menu:
          Y "..."
          "Yeah, I'm feeling pretty nervous now.":
              jump R1
              
          "What do you think happened?":
              jump R2
I'll try that out. Thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot]