Parsing Script expected statement??!

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
Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Parsing Script expected statement??!

#1 Post by Owl.Child »

I've started working on a visual novel but I keep getting the error "Parsing the script failed", then as details it has

Code: Select all

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


File "game/script.rpy", line 24: expected statement.
    ("[povgender!t]")== "she" 
                              ^

File "game/script.rpy", line 26: expected statement.
    ("[povgender!t]") == "he" 
                              ^

Ren'Py Version: Ren'Py 6.99.12.3.2123


HELP?? :cry:

~Edit~

pt 1. (it works here)

Code: Select all

scene gender
"What is your gender?"
menu:
    "she":
       ("[povgender!t]")== "she" :
    "he":
       ("[povgender!t]") == "he": 
    
if ("[povgender!t]") == "she":
       pov "I prefer she."
if ("[povgender!t]") == "he":
       pov "I prefer he."

Part 2. (doesn't work?)

Code: Select all

w "Oh.. Hi there.."

if ("[povgender!t]") == "he":
        w "Jasper calm him down.."
                          
if ("[povgender!t]") == "she":
        w "Jasper calm her down.."

j "o-oh uh... sure... (He nods a bit unsure)"
Last edited by Owl.Child on Fri Feb 17, 2017 8:33 am, edited 3 times in total.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
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: Parsing Script expected statement??!

#2 Post by Donmai »

Show us that part of the script, so we can understand what you're trying to do.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Parsing Script expected statement??!

#3 Post by Owl.Child »

Donmai wrote:Show us that part of the script, so we can understand what you're trying to do.

Right of course, how silly of me.. :oops:

Code: Select all

w "Oh.. Hi there.."

if ("[povgender!t]") == "he":
        w "Jasper calm him down.."
                          
if ("[povgender!t]") == "she":
        w "Jasper calm her down.."

j "o-oh uh... sure... (He nods a bit unsure)"
Last edited by Owl.Child on Fri Feb 17, 2017 8:32 am, edited 1 time in total.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Parsing Script expected statement??!

#4 Post by Divona »

Code: Select all

scene gender
"What is your gender?"

menu:
    "she":
        $ povgender = "she" 
    "he":
        $ povgender = "he" 

if povgender == "she":
    pov "I prefer she."

elif povgender == "he":
    pov "I prefer he."

w "Oh.. Hi there.."

if povgender == "he":
    w "Jasper calm him down.."

elif povgender == "she":
    w "Jasper calm her down.."

j "o-oh uh... sure... (He nods a bit unsure)"
Completed:
Image

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Parsing Script expected statement??!

#5 Post by Owl.Child »

Divona wrote:

Code: Select all

scene gender
"What is your gender?"

menu:
    "she":
        $ povgender = "she" 
    "he":
        $ povgender = "he" 

if povgender == "she":
    pov "I prefer she."

elif povgender == "he":
    pov "I prefer he."

w "Oh.. Hi there.."

if povgender == "he":
    w "Jasper calm him down.."

elif povgender == "she":
    w "Jasper calm her down.."

j "o-oh uh... sure... (He nods a bit unsure)"
It seems right but I'm still getting the error :/

Code: Select all

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


File "game/script.rpy", line 24: expected statement.
    ("[povgender!t]")== "she" :
                              ^

File "game/script.rpy", line 26: expected statement.
    ("[povgender!t]") == "he": 
                             ^

Ren'Py Version: Ren'Py 6.99.12.3.2123

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Parsing Script expected statement??!

#6 Post by indoneko »

I wonder why you used !t in that line.
Can you post your full script.rpy here?
(You can trim it first to remove the unnecessary lines/dialogues).
My avatar is courtesy of Mellanthe

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Parsing Script expected statement??!

#7 Post by Owl.Child »

Code: Select all

scene blank
$ povname = renpy.input(_("What is your name?"))
pov   "My name is [povname!t]."

scene gender
"What is your gender?"

menu:
    "she":
        $ povgender = "she" 
    "he":
        $ povgender = "he" 

if povgender == "she":
    pov "I prefer she."

elif povgender == "he":
    pov "I prefer he."

scene blank
n "Well, [povname!t] , 

if povgender == "he":
    w "Jasper calm him down.."

elif povgender == "she":
    w "Jasper calm her down.."

"You choose to..."
menu:
    "Push him away":
        $ you = "No"
    "Smile and hug back": 
        $ you = "Yes"
    
if you == "No":
    pov "!"
    j "Oh uh.. s-sorry.."
    
elif you == "Yes":
    "you weirdly enjoy his touch"
    "Jasper smiles"

(Sorry about that, I'm a bit of a nwebie)
Last edited by Owl.Child on Fri Feb 17, 2017 8:32 am, edited 1 time in total.

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Parsing Script expected statement??!

#8 Post by indoneko »

Please use

Code: Select all

 and [/ code] tag when you post your code in this forum. You can edit your post and add the tag there.
My avatar is courtesy of Mellanthe

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Parsing Script expected statement??!

#9 Post by Owl.Child »

indoneko wrote:Please use

Code: Select all

 and [/ code] tag when you post your code in this forum. You can edit your post and add the tag there.[/quote]
Sorry about that, I've fixed my scripts to coding. Sorry again

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Parsing Script expected statement??!

#10 Post by indoneko »

Ok, I'm missing the part where you define that "pov" and other character. Are they also in script.rpy?
And your new code that you posted above doesn't contain the line that mentioned in this error message.
Did you actually update your script.rpy?

Code: Select all

File "game/script.rpy", line 24: expected statement.
    ("[povgender!t]")== "she" :
Edit : you made a typo/miss in this line :

Code: Select all

scene blank
n "Well, [povname!t] ,
it should be

Code: Select all

scene blank
n "Well, [povname!t] "
My avatar is courtesy of Mellanthe

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Parsing Script expected statement??!

#11 Post by Owl.Child »

indoneko wrote:Ok, I'm missing the part where you define that "pov" and other character. Are they also in script.rpy?
And your new code that you posted above doesn't contain the line that mentioned in this error message.
Did you actually update your script.rpy?

Code: Select all

File "game/script.rpy", line 24: expected statement.
    ("[povgender!t]")== "she" :
Edit : you made a typo/miss in this line :

Code: Select all

scene blank
n "Well, [povname!t] ,
it should be

Code: Select all

scene blank
n "Well, [povname!t] "

Code: Select all

define n = Character("Narrator")
define pov = ("[povname!t]")
define w = ("???")
define povg = ("[povgender!t]")
define j = ("Jasper")  
define she = ("she")
define he = ("he")
label start:

image room = "Flower.jpg"
image cold = "rain-day.jpg"
image blank = "black-screen.png"
image gender = "black-screen2.png"

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Parsing Script expected statement??!

#12 Post by Divona »

Code: Select all

define n = Character("Narrator")
define pov = Character("[povname]")
define w = Character("???")
define j = Character("Jasper")

default povname = ""
default povgender = ""

default you = ""

image room = "Flower.jpg"
image cold = "rain-day.jpg"
image blank = "black-screen.png"
image gender = "black-screen2.png"

label start:

    scene blank

    $ povname = renpy.input(_("What is your name?"))
    pov "My name is [povname]."

    scene gender

    "What is your gender?"

    menu:
        "she":
            $ povgender = "she"
        "he":
            $ povgender = "he"

    if povgender == "she":
        pov "I prefer she."

    elif povgender == "he":
        pov "I prefer he."

    scene blank

    n "Well, [povname]"

    if povgender == "he":
        w "Jasper calm him down.."

    elif povgender == "she":
        w "Jasper calm her down.."

    "You choose to..."

    menu:
        "Push him away":
            $ you = "No"
        "Smile and hug back":
            $ you = "Yes"

    if you == "No":
        pov "!"
        j "Oh uh.. s-sorry.."

    elif you == "Yes":
        "you weirdly enjoy his touch"
        "Jasper smiles"
Completed:
Image

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Parsing Script expected statement??!

#13 Post by Owl.Child »

Divona wrote:

Code: Select all

define n = Character("Narrator")
define pov = Character("[povname]")
define w = Character("???")
define j = Character("Jasper")

default povname = ""
default povgender = ""

default you = ""

image room = "Flower.jpg"
image cold = "rain-day.jpg"
image blank = "black-screen.png"
image gender = "black-screen2.png"

label start:

    scene blank

    $ povname = renpy.input(_("What is your name?"))
    pov "My name is [povname]."

    scene gender

    "What is your gender?"

    menu:
        "she":
            $ povgender = "she"
        "he":
            $ povgender = "he"

    if povgender == "she":
        pov "I prefer she."

    elif povgender == "he":
        pov "I prefer he."

    scene blank

    n "Well, [povname]"

    if povgender == "he":
        w "Jasper calm him down.."

    elif povgender == "she":
        w "Jasper calm her down.."

    "You choose to..."

    menu:
        "Push him away":
            $ you = "No"
        "Smile and hug back":
            $ you = "Yes"

    if you == "No":
        pov "!"
        j "Oh uh.. s-sorry.."

    elif you == "Yes":
        "you weirdly enjoy his touch"
        "Jasper smiles"

Thank you so much!

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot], voluorem