Indentation issues?! //solved

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
shojozombie
Newbie
Posts: 11
Joined: Thu Jan 28, 2016 8:06 am

Indentation issues?! //solved

#1 Post by shojozombie » Thu Jan 28, 2016 8:14 am

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 28: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
menu:
^

Ren'Py Version: Ren'Py 6.99.8.959


I've been on the forums the past day or so looking for answers to these, so I'm fairly sure this is an indentation problem. But I've tried so, so very many variations of where I'm putting things and I'm still getting variations of these same errors. Here is my code:

Code: Select all

# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"

image bg test = "background test.jpg"
image officer test = "test char officer.png"
image questioning = "interrogation room.png"
image oldlady = "old lady.png"
image oldsad = "old lady down.png"

# Declare characters used by this game.
##define Old = Character('Old Lady Witness', color="#c8ffc8")
define Ada = DynamicCharacter("OLW", who_color="#e794fd") #who_colour sets colour for character's name in this instance
#variable is OldLadyWitness but does not mean anything until called. Here I am using it to say 'Old Lady Witness' until the witness identifies herself as Ada, at which point her name will display as Ada.

# The game starts here.
label start:
    scene bg test
    show officer test
    $ OLW = "Old Lady Witness"
    #Dynamic character 'OLW'  has been set.
    
    "Public place. Middle of the day."
    "You'd think this would be an easy case to solve."
    "Who should I speak to?"
    
        menu:
            "I think I'll speak to the old woman.":
                jump questioning
    
    label questioning:
    show oldlady
    
    "This interview is being recorded by Inspector Name. Ma'am, can you confirm your name and age for the recording please?"
    Ada "Ada Clarke, 64."
    #this is where Old Lady Witness becomes Ada in the text box
    $ OLW = "Ada"
    "Thank-you. Interview commencing 5.55pm, staff room at Fairview Shopping Centre. Now, why don't we start with you telling me where you were at the time of the incident?"
    Ada "Well, I was in the food court, I think..."
    "You think?"
    #the colour tag below can be used for expressing character actions
    "{color=#40f294}The lady shifts uncomfortably{/color}"
    show oldsad with dissolve
    Ada "Yes. I have problems with my memory, you see."
    
return

Can anyone tell me where I'm going wrong? :/ All I'm trying to do is make a screen that's like "choice person 1", "choice person 2" etc, then when the player clicks "choice person 1", the game will go to a screen with the old lady/person 1 in it. Once I get the old lady working I hope I can then add more character screens using the same method.

Please don't bite! Very new to Ren'py + very very beginner python in general.

Thanks for your help in advance! :o
Last edited by shojozombie on Thu Jan 28, 2016 8:44 am, edited 1 time in total.

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Indentation issues?!

#2 Post by mobychan » Thu Jan 28, 2016 8:21 am

Your menu is indented too far ;)

Code: Select all

# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"

image bg test = "background test.jpg"
image officer test = "test char officer.png"
image questioning = "interrogation room.png"
image oldlady = "old lady.png"
image oldsad = "old lady down.png"

# Declare characters used by this game.
##define Old = Character('Old Lady Witness', color="#c8ffc8")
define Ada = DynamicCharacter("OLW", who_color="#e794fd") #who_colour sets colour for character's name in this instance
#variable is OldLadyWitness but does not mean anything until called. Here I am using it to say 'Old Lady Witness' until the witness identifies herself as Ada, at which point her name will display as Ada.

# The game starts here.
label start:
    scene bg test
    show officer test
    $ OLW = "Old Lady Witness"
    #Dynamic character 'OLW'  has been set.
    
    "Public place. Middle of the day."
    "You'd think this would be an easy case to solve."
    "Who should I speak to?"
    
    menu:
        "I think I'll speak to the old woman.":
            jump questioning
    
label questioning:
    show oldlady
    
    "This interview is being recorded by Inspector Name. Ma'am, can you confirm your name and age for the recording please?"
    Ada "Ada Clarke, 64."
    #this is where Old Lady Witness becomes Ada in the text box
    $ OLW = "Ada"
    "Thank-you. Interview commencing 5.55pm, staff room at Fairview Shopping Centre. Now, why don't we start with you telling me where you were at the time of the incident?"
    Ada "Well, I was in the food court, I think..."
    "You think?"
    #the colour tag below can be used for expressing character actions
    "{color=#40f294}The lady shifts uncomfortably{/color}"
    show oldsad with dissolve
    Ada "Yes. I have problems with my memory, you see."
    
return

shojozombie
Newbie
Posts: 11
Joined: Thu Jan 28, 2016 8:06 am

Re: Indentation issues?!

#3 Post by shojozombie » Thu Jan 28, 2016 8:41 am

GAH. Always something that should be obvious isn't it? xD

[Edit nvm I fixed the extra problem!]

Thank you xD
Last edited by shojozombie on Thu Jan 28, 2016 8:43 am, edited 1 time in total.

User avatar
Iylae
Regular
Posts: 73
Joined: Sat Jan 09, 2016 6:57 am
Location: Cornwall, UK
Contact:

Re: Indentation issues?!

#4 Post by Iylae » Thu Jan 28, 2016 8:42 am

It's good practice to post another thread, unless it's related to the thread title "Indentation issues?!"
Image
  If we are what we repeatedly do, then good coding is not an act, but a habit

shojozombie
Newbie
Posts: 11
Joined: Thu Jan 28, 2016 8:06 am

Re: Indentation issues?!

#5 Post by shojozombie » Thu Jan 28, 2016 8:43 am

See above x) but duly noted for when I inevitably run into problems again x)

Thanks very much :3

Post Reply

Who is online

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