"End of line expected" Error message

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
vaanknight
Regular
Posts: 118
Joined: Sun Mar 28, 2010 6:01 pm
Completed: Happy Weird-Day! How a freckled fairy can save your world (Or get more freckles in the process...)"
Projects: Nameless 2D Fighting Game
Contact:

"End of line expected" Error message

#1 Post by vaanknight »

I'm hard at work with my current project, I just started to learn to use Ren'Py and now that I need to add a bit more complex stuff, I got this error message. I can't see what's wrong with my statement, so I was wondering if anyone could explain to me what exactly I'm missing here? :?

these are the declared images I'm using for this statement only:

Code: Select all

    image jenny laugh flip = im.Flip("j_laugh.png", horizontal=True)
    image fairy err = "c_fairy_err.png"
these are the two statements as I typed them:

Code: Select all

    show fairy err at left
    with dissolve

    show jenny laugh flip at Position(xpos=0.3, xanchor=0, ypos=1.0, yanchor=1.0) behind fairy err
    with dissolve
and I got this error message:

Code: Select all

On line 456 of [here goes the file location]cazz/game/script.rpy: end of line expected.
show jenny laugh flip at Position(xpos=0.3, xanchor=0, ypos=1.0, yanchor=1.0) behind fairy err
                                                        ^
It appears to indicate there's something wrong with the ypos value, but I have no clue. Any help please? :(
Image

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

Re: "End of line expected" Error message

#2 Post by Aleema »

First, try setting the "xanchor" to "0.0", instead of just "0". See if that works.
Next, remove the "behind" qualifier and see if it works. I find that's a fickle piece of code that doesn't like being combined with too many qualifiers.
Try putting the "with dissolve" on the same line as "show blah blah ...". That can be fickle, too.
If it still doesn't work, you can define the Position in an init block ($ jennypos = Position(...)) and call it by name (... at jennypos ...)
Also, ignore that little arrow. xD

vaanknight
Regular
Posts: 118
Joined: Sun Mar 28, 2010 6:01 pm
Completed: Happy Weird-Day! How a freckled fairy can save your world (Or get more freckles in the process...)"
Projects: Nameless 2D Fighting Game
Contact:

Re: "End of line expected" Error message

#3 Post by vaanknight »

Thank you very much! I took away the behind qualifier and it went ok, but I still need to put that image behind the other one = =', any trick to make that happen?
Image

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

Re: "End of line expected" Error message

#4 Post by Aleema »

vaanknight wrote:Thank you very much! I took away the behind qualifier and it went ok, but I still need to put that image behind the other one = =', any trick to make that happen?
Define it first. If the fairy image is there a while before she "laugh flips", then try redefining the image after the jenny one anyway. Just think of it as ... whatever is defined last is on top. :) (By define, I just mean the order of the "show" images.)

vaanknight
Regular
Posts: 118
Joined: Sun Mar 28, 2010 6:01 pm
Completed: Happy Weird-Day! How a freckled fairy can save your world (Or get more freckles in the process...)"
Projects: Nameless 2D Fighting Game
Contact:

Re: "End of line expected" Error message

#5 Post by vaanknight »

Problem solved! Thanks a bunch, Aleema! I did as you suggested and ...it still didn't work. xD Since the fairy was already there before anything happened, it didn't matter the order of the statements, she stood behind everything. But what you said gave me the right idea.

I had to use this cheesy alternative, I post it in case someone ever has to take care of the same issue:

Code: Select all

show jenny normal flip at jennypos with dissolve

    hide fairy pissed
    
    show fairy pissed
        
    show fairy serious at left with dissolve
Now all I have to do is try to spend an entire afternoon making new sprites to show the fairy's wings behind while the rest is still on top, without perishing in the process ;]

Image
Image

number473
Regular
Posts: 195
Joined: Tue Dec 15, 2009 4:20 am
Projects: The Duke's Daughter
Location: Cape Town
Contact:

Re: "End of line expected" Error message

#6 Post by number473 »

If you just make a copy of the sprite and erase off the wings, then you can put the copy with the wings at the back and the one without in the front. It should take about 2 minutes since it doesn't matter how untidy you make it, the overlap and the full sprite at the back will take care of it.
Mental weather report: Cloudy with a possibility of brain storms.

vaanknight
Regular
Posts: 118
Joined: Sun Mar 28, 2010 6:01 pm
Completed: Happy Weird-Day! How a freckled fairy can save your world (Or get more freckles in the process...)"
Projects: Nameless 2D Fighting Game
Contact:

Re: "End of line expected" Error message

#7 Post by vaanknight »

Thanks, I already fixed it up, 'twas only messing around xD I should be ok for now.
Image

MelMeiko
Regular
Posts: 38
Joined: Wed Apr 07, 2010 6:26 pm
Projects: Otome Eroge VN
Contact:

Re: "End of line expected" Error message

#8 Post by MelMeiko »

I hope I'm not imposing posting in a thread where one problem was solved already, but I got the same error message.

On line 262 of G:\renpy-6.10.2\Duel Heart/game/script.rpy: end of line expected.
jump too bad
^

On line 269 of G:\renpy-6.10.2\Duel Heart/game/script.rpy: expected ':' not found.
label too bad:
^

On line 277 of G:\renpy-6.10.2\Duel Heart/game/script.rpy: end of line expected.
d "Hahaha.":
^

And the jumps and menus I was working with was:
menu:

"Really? That's too bad":

jump too bad

"Really? I don't believe you, but whatever!":

jump dubious


label too bad:

d "Thank you, Madam.":

jump continue1

label dubious:

d "Hahaha.":

jump continue1


label continue1:
d "In any case, if you're going to go after him, I suggest you do it before you lose track of where he could have gone."

Please help meeee
Nothing and no one is absolute.

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

Re: "End of line expected" Error message

#9 Post by Aleema »

@ MelMeiko: First of all, are you indenting properly? Use the "Code" tag to retain indentation when copy/pasting to the forum. If you're not indenting, then that's the problem. =P

Also, you have colons after some of your lines (like: "d "Thank you, Madam.":"). :)

MelMeiko
Regular
Posts: 38
Joined: Wed Apr 07, 2010 6:26 pm
Projects: Otome Eroge VN
Contact:

Re: "End of line expected" Error message

#10 Post by MelMeiko »

Code: Select all

  menu:
    
        "Really? That's too bad":
            
            jump toobad
            
        "Really? I don't believe you, but whatever!":
            
            jump dubious
            
label toobad:

    d  "Thank you, Madam.That is very kind of you":
        
            jump continue1

label dubious:
    
    d  "Hahaha...":

            jump continue1
        

label continue1:
    
    d  "In any case, if you're going to go after him, I suggest you do it before you lose track of where he could have gone."
I indented except for when I did the labels.

4 spaces for the menu line , 8 spaces towards the line for the choices, 12 for the jumps with an empty block of space after each and 2 blocks before the labels. And for the labels, there are no indentations.

I've been following "The_Question" script flow for the menu and jumps/labels

I've been stuck on this for hours -_-

THe error lies with

On line 270 of G:\renpy-6.10.2\Duel Heart/game/script.rpy: end of line expected.
d "Thank you, Madam.That is very kind of you":
^

On line 276 of G:\renpy-6.10.2\Duel Heart/game/script.rpy: end of line expected.
d "Hahaha...":
^

now
Nothing and no one is absolute.

Wintermoon
Miko-Class Veteran
Posts: 701
Joined: Sat May 26, 2007 3:41 pm
Contact:

Re: "End of line expected" Error message

#11 Post by Wintermoon »

MelMeiko wrote:

Code: Select all

    d  "Thank you, Madam.That is very kind of you":
        
            jump continue1
This is not a menu item, so lose the ':' at the end of the first line and keep the second line indented at the same level, like this:

Code: Select all

    d  "Thank you, Madam.That is very kind of you"        
    jump continue1

Post Reply

Who is online

Users browsing this forum: Google [Bot]