Page 1 of 1

What am I doing wrong when creating a choice???!! (Solved)

Posted: Wed May 15, 2013 11:09 am
by Ruubste
I'm like stuck for a month, I just can't figure it out.
My english can also be a problem, sorry but I'm from the Netherlands and I don't understand what they mean.

I'm making an Otome game, and I'm first practicing with a tutorial. But when I have to make "Choices" (the player should make to make boy A or boy B happy) I get stuck.

I've got screen shots, you might have to zome in.

So this is the script as shown in the tutorial, I copied it completely:

http://tinypic.com/view.php?pic=u4vpl&s=5

And this is what I get when I launch my project:

http://tinypic.com/view.php?pic=2w2hq50&s=5

I hope someone recognizes this and already solved it so he/she could help me.

Thank you for reading!

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:33 am
by Talann
I think it would be best if you copy & paste the code to your post so we can correct it.

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:42 am
by Ruubste
Talann wrote:I think it would be best if you copy & paste the code to your post so we can correct it.
So yeah, I'm a real noob.

What do you exactly mean? The weblink or what?

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:45 am
by Chaotic
Basically your "menu:" bit is indented and you don't want to be indented.

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:49 am
by Vilhelmina
Ruubste wrote:
Talann wrote:I think it would be best if you copy & paste the code to your post so we can correct it.
So yeah, I'm a real noob.

What do you exactly mean? The weblink or what?
Talann is referring to the actual script code, from your script.rpy file.

It sounds from your error message like the indentation (number of spaces before the code for the menu) is the problem, but it's easier for us to help you correct it if we get to see your code. :)

edit: Err,sorry, I guess I mixed up your usernames. xD

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:51 am
by Ruubste
Chaotic wrote:Basically your "menu:" bit is indented and you don't want to be indented.
As I said, my English isn't very good and that was the word I didn't understand.

Could you please give an explenation or a synonym?

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:55 am
by Ruubste
Vilhelmina wrote:
Ruubste wrote:
Talann wrote:I think it would be best if you copy & paste the code to your post so we can correct it.
So yeah, I'm a real noob.

What do you exactly mean? The weblink or what?
Talann is referring to the actual script code, from your script.rpy file.

It sounds from your error message like the indentation (number of spaces before the code for the menu) is the problem, but it's easier for us to help you correct it if we get to see your code. :)

edit: Err,sorry, I guess I mixed up your usernames. xD

God I feel SUPER stupid right now, where/how can I give you that code?

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 11:58 am
by Vilhelmina
Ruubste wrote:
Chaotic wrote:Basically your "menu:" bit is indented and you don't want to be indented.
As I said, my English isn't very good and that was the word I didn't understand.

Could you please give an explenation or a synonym?
Ah, I see.

For the verb "to indent", dictionary.com gives this as one of the definitions: "to set in or back from the margin, as the first line of a paragraph."

Basically, it means that the text on that line (line 52) has a couple of empty spaces before it, causing RenPy to believe the menu code lies within a new block. Remove those spaces and your code should work.

For more information about RenPy language, you can check this part of the documentation

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 12:00 pm
by Vilhelmina
Ruubste wrote: God I feel SUPER stupid right now, where/how can I give you that code?
You would need to select it in your script editor, push ctrl+c (or cmd+c if you're on a mac), then go back into the forums and push ctrl+v to paste that part of the code into a new forum post.

Edit: You would also need to use the code function, so around the code you paste you write [ code ] and [ / code ] (without the spaces). Otherwise we will not see the indentation / spaces correctly.

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 12:03 pm
by Ruubste
Vilhelmina wrote:
Ruubste wrote:
Chaotic wrote:Basically your "menu:" bit is indented and you don't want to be indented.
As I said, my English isn't very good and that was the word I didn't understand.

Could you please give an explenation or a synonym?
Ah, I see.

For the verb "to indent", dictionary.com gives this as one of the definitions: "to set in or back from the margin, as the first line of a paragraph."

Basically, it means that the text on that line (line 52) has a couple of empty spaces before it, causing RenPy to believe the menu code lies within a new block. Remove those spaces and your code should work.

For more information about RenPy language, you can check this part of the documentation
Yes it worked!

Thank you so much! I can finally start with my VN.

Thank you for being so patient, you really helped me!

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 12:04 pm
by Vilhelmina
Ruubste wrote: Yes it worked!

Thank you so much! I can finally start with my VN.

Thank you for being so patient, you really helped me!
Ah, it seems like we posted at the same time n_n

I'm glad you managed to solve it, best of luck with your game!

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 12:25 pm
by pwisaguacate
Vilhelmina wrote:This is a quick example from one of my scripts:

Code: Select all

    ep "“You'll have one less foe to worry about.”"

menu:
    
        "Tell him he's lost his mind":
                 
                 jump x1
                 
        "It's not a bad idea":
            
                jump x2
See how the word "menu" comes immediately on the row, without any spaces before it? That's what you want to do :)
Generally, everything within a label is indented away from the label's level:

Code: Select all

label start:
    scene bg split_paths

    "Which way will you take?"

    menu:
        "Left":
            jump go_left
        "Right":
            jump go_right

label go_left:
    [...]

label go_right:
    [...]
Ruubste had the menu indented from a line a dialogue, and the dialogue isn't supposed to take a block.

Re: What am I doing wrong when creating a choice???!!

Posted: Wed May 15, 2013 12:27 pm
by Vilhelmina
pwisaguacate wrote: Ruubste had the menu indented from a line a dialogue, and the dialogue isn't supposed to take a block.
That's wording it even better than I could, thank you :)