"expected ':' not found." - Help? .3.

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
shadow190
Newbie
Posts: 22
Joined: Wed Feb 24, 2010 11:32 am
Projects: Kidnapping Love
Location: Europe, Austria
Contact:

"expected ':' not found." - Help? .3.

#1 Post by shadow190 » Wed Feb 24, 2010 12:00 pm

Hi!

I'm using a MacBook Pro and have the latest version von Ren'Py installed.
Currently I'm working on my first real VN... ^^
And hope that you can help me, I would appreciate it very much! =)

The Error-Messages:

Code: Select all

On line 131 of /Users/Shad/Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: expected ':' not found.
label talk boy:
           ^

On line 172 of /Users/Shad/Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: expected ':' not found.
label talk girl:
           ^

On line 213 of /Users/Shad/Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: expected ':' not found.
label good talk boy:
           ^

On line 335 of /Users/Shad/Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: expected ':' not found.
label good talk girl:
           ^

Ren'Py Version: Ren'Py 6.10.2e

The lines in the script:

Code: Select all

    menu:
        "Male."
        jump boy

Code: Select all

    menu:
        "... Won't do that."
        jump murder boy

Code: Select all

    menu:
        "... Won't do that."
        jump murder girl
        
        "... Will do it."
        jump talk girl

label talk boy:

Code: Select all

    menu:
        "I'll just be \"nice\" to him..."
        jump good talk girl
        
        "I'll show him who's the boss!"
        jump bad talk girl
        
label good talk boy:

Code: Select all

    jump next day boy
    
label good talk girl:

I'm sorry that I couldn't write it in a better way... ^^°

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: "expected ':' not found." - Help? .3.

#2 Post by Jake » Wed Feb 24, 2010 12:17 pm

shadow190 wrote:

Code: Select all

On line 131 of /Users/Shad/Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: expected ':' not found.
label talk boy:
           ^
I'm pretty sure this is because label names can't have spaces in, although the documentation helpfully doesn't mention this. Try replacing them with underscore (_) characters instead, so that:

Code: Select all

label talk boy:
becomes:

Code: Select all

label talk_boy:
and

Code: Select all

jump talk boy
becomes:

Code: Select all

jump talk_boy
Server error: user 'Jake' not found

User avatar
Gumaster
Regular
Posts: 93
Joined: Sun Sep 06, 2009 6:54 am
Contact:

Re: "expected ':' not found." - Help? .3.

#3 Post by Gumaster » Thu Feb 25, 2010 1:07 am

shadow190 wrote:

Code: Select all

    menu:
        "Male."
        jump boy
is missing, (exactly as the error log says xD) a ":"
So it becomes

Code: Select all

    menu:
        "Male.":
        jump boy
and yes, you can't have spaces in the code for labels and whatnot, (files names are fine, like "Pictures/first cg.jpg" I think)

Edit: Ah crap, sorry, it was answered already in your other post >.<
Disregard me~

shadow190
Newbie
Posts: 22
Joined: Wed Feb 24, 2010 11:32 am
Projects: Kidnapping Love
Location: Europe, Austria
Contact:

Re: "expected ':' not found." - Help? .3.

#4 Post by shadow190 » Thu Feb 25, 2010 2:54 am

Thank you very much you two

My game is working now just fine.

But I still have a problem...

How do I get a black screen without using the "hide"-command?

Is it like this?

Code: Select all

init:
image black = "#00000"
And then writing somewhere:

Code: Select all

label bla:
scene black with fade
?

Because it didn't work, when I tried that.

User avatar
Spiky Caterpillar
Veteran
Posts: 253
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.
Contact:

Re: "expected ':' not found." - Help? .3.

#5 Post by Spiky Caterpillar » Thu Feb 25, 2010 3:32 am

Code: Select all

init:
    image black = Solid('#000') 

label start:
    scene black with dissolve
should do what you want.

AFAIK '#00000' is an invalid colour - you want a six-digit '#000000' or three-digit '#000'.
Nom nom nom nom nom LEAVES.

shadow190
Newbie
Posts: 22
Joined: Wed Feb 24, 2010 11:32 am
Projects: Kidnapping Love
Location: Europe, Austria
Contact:

Re: "expected ':' not found." - Help? .3.

#6 Post by shadow190 » Thu Feb 25, 2010 4:48 am

Awww, thx... I know, that I'm a noob, but someday, I'll sure be better. =)

EDIT:
Hah, now it showed me this... ^^

Code: Select all

On line 4 of /Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: image statement does not expect a block. Please check the indentation of the line after this one.
image black = Solid('#000000')
                              ^

On line 30 of /Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: scene statement does not expect a block. Please check the indentation of the line after this one.
scene black
           ^

EDIT 2:

To be honest, some things just don't seem to work. I checked the tut - it SHOULD work.

I can't use images as scenes or a .wav-File as a soundeffect, I have this failure I already explained with the black (btw., I also tried it with

Code: Select all

image black = Solid("#000")
)
...

._____. This is rly depressing!

User avatar
duanemoody
Regular
Posts: 100
Joined: Fri Oct 02, 2009 2:32 pm
Projects: American Jurassic
Organization: Pier 7 Media
Location: Arizona
Contact:

Re: "expected ':' not found." - Help? .3.

#7 Post by duanemoody » Thu Feb 25, 2010 12:32 pm

in your init.rpy:

Code: Select all

image bg black = "#000000"
In your script:

Code: Select all

scene bg black with fade
Try this instead. I don't know why you're trying to use Solid. The important thing to understand about images in Ren'Py is the concept of labels and tags. The fact that Python likes using spaces where other languages would normally use periods to define a relationship between two things is probably your biggest conceptual hurdle here.

Code: Select all

image emily sad = "images/emily_basic/emily_basic_sad.png"
image emily happy = "images/emily_basic/emily_basic_happy.png"
image bg penned_mono = "images/pennedmono.jpg"
image bg black = "#000000"
'emily' is a label. 'sad' is a tag. The idea is that Ren'Py is keeping one emily sprite object on the screen and the tag tells Ren'Py which emily image to display when you call it with show (or some other transformation). Likewise, you only have one background on the screen at any given time (bg) and the label tells Ren'Py which background you wish to use.

If you didn't have labels and tags, you could unintentionally have multiple overlapping emily sprites on the screen simultaneously instead of one replacing another.

shadow190
Newbie
Posts: 22
Joined: Wed Feb 24, 2010 11:32 am
Projects: Kidnapping Love
Location: Europe, Austria
Contact:

Re: "expected ':' not found." - Help? .3.

#8 Post by shadow190 » Thu Feb 25, 2010 12:42 pm

Thx. =)

Now it shows me this xD

Code: Select all

On line 23 of /Users/Shad/Downloads/renpy-6.10.2/Games/Kidnapping Love/game/script.rpy: scene statement does not expect a block. Please check the indentation of the line after this one.
scene bg black with fade
                        ^
In the script it looks like this:

Code: Select all

    menu:
        "Male.":
            jump b
        
        "Female.":
            jump g

        
label b:
scene bg black with fade

    b "Hey! Let me go! We didn't do anything to you!"

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: "expected ':' not found." - Help? .3.

#9 Post by Jake » Thu Feb 25, 2010 1:28 pm

shadow190 wrote:

Code: Select all

label b:
scene bg black with fade

    b "Hey! Let me go! We didn't do anything to you!"
Indent the line starting 'scene' to match the line starting 'b'.

Basically, Python (and Ren'Py) uses indentation to determine dependent blocks of code - so much like the way that the script that gets run for a particular menu item is indented one level further than the menu choice, the code which gets run inside a particular label needs to be indented one level further than the label itself.

What you've actually got here at the moment is a completely empty label 'b' (because there's no lines following it which are indented further) followed by a line of script which sets the 'scene'... then an indented block which is dependent on the scene command. But the scene command doesn't allow dependent blocks of code, it's not a control structure like an 'if' or a 'menu' and Ren'Py doesn't know what to do with the indented block, so it's throwing the error.
Server error: user 'Jake' not found

shadow190
Newbie
Posts: 22
Joined: Wed Feb 24, 2010 11:32 am
Projects: Kidnapping Love
Location: Europe, Austria
Contact:

Re: "expected ':' not found." - Help? .3.

#10 Post by shadow190 » Thu Feb 25, 2010 4:06 pm

*____* Aaaaah!


Thank you so much for your help!


I think that's everything... ^^

Post Reply

Who is online

Users browsing this forum: No registered users