help on error script

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
User avatar
firecat
Miko-Class Veteran
Posts: 540
Joined: Sat Oct 25, 2014 6:20 pm
Completed: The Unknowns Saga series
Projects: The Unknown Saga series
Tumblr: bigattck
Deviantart: bigattck
Skype: bigattck firecat
Soundcloud: bigattck-firecat
Contact:

help on error script

#1 Post by firecat »

i dont know what i'm doing wrong, i check the wiki, looked at 'question' for any mistake, and try to find answers in the forums but theres no way anyone is having problems like mine. on the first quote you see the error is telling me to fix but on the 2th quote the whole script is shown and i don't see any errors on it.
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


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

File "game/script.rpy", line 37: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
a "what are you doing, you could have hurt me"
^

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

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

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

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

Ren'Py Version: Ren'Py 6.18.3.761

Code: Select all

define a = Character('Angel', color="#ffffff")

define d = Character('Dark', color="#000000")

image background = "the background.jpg"

image picture = "the picture.jpg"

image picture_dark = "the 2th picture.jpg"

image water = "try again.jpg"

label start:

    play music "music.mp3"
    
    scene background
    
    show picture at left

    a "Its nice to get some rest"

"A mystery person appears"
    
    show picture_dark at right
    
    a "Whos there?"
    
    d "I find you at last, now i can take over the world"
    
    a "What are you talking about?"
    
    play sound "sound.mp3"
    
"The mystery person attack without warning.\wAngel dodge it just in time."

    a "what are you doing, you could have hurt me"
    
    d "if i dont kill you then theres no way i can take over the world"
    
"The mystery person attacks faster..."

    menu:
    
        "dodge again":
            
            jump one
        
        "use magic":
            
            jump two
        
        "do nothing":
            
            jump three

label one:
    
    stop music
    
    hide picture
    
    hide picture_dark
    
    scene black

"Dodging did not work and you end up killed"
    
    show water at center
    
    return
    
label two:
    
    hide picture
    
    hide picture_dark
    
    stop music
    
    scene black
    
"only few unknowns have magic and yours is not one of them..."

    show water at center
    
    return
    
label three:
    
    play sound "magicblock.mp3"
    
    hide picture_dark
    
"you hear something blocking the attack.\wwhen you look to see what it was the mystery boy was gone."
    
    a "what just happen..."
please help i don't know what am doing wrong.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: help on error script

#2 Post by Donmai »

The error messages are very clear: you have an indentation problem, and the problem is when you add the narrator speech. Align it with the other say statements by adding four spaces at the start of that line:

Code: Select all

    show picture at left

    a "Its nice to get some rest"

    "A mystery person appears" #you must keep the same indentation here, because you are not starting a new block of code
    
    show picture_dark at right
    
    a "Who's there?"
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
firecat
Miko-Class Veteran
Posts: 540
Joined: Sat Oct 25, 2014 6:20 pm
Completed: The Unknowns Saga series
Projects: The Unknown Saga series
Tumblr: bigattck
Deviantart: bigattck
Skype: bigattck firecat
Soundcloud: bigattck-firecat
Contact:

Re: help on error script

#3 Post by firecat »

thanks for the help. i didnt know it needed to be the same with the text.
Image


Image


special thanks to nantoka.main.jp and iichan_lolbot

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: help on error script

#4 Post by Donmai »

You are very welcome.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: Google [Bot]