Input reader's name is asked twice

I’ve input the code input What is your name? | What is your name? | Done (YOU)

But is the question suppose to be asked twice to the reader?

I find that a bit annoying to re-input a name twice.

Don’t worry, it won’t actually ask the reader twice. That’s just the way it’s coded. The reader will only see the input box once. :+1:

You can preview it in the app to see. :grin: (Input boxes don’t preview in the writer’s portal, but they do in the app.)

Interesting, well when I check on the mobile previewer, it’s asked twice. :confused:

:thinking: Odd, it usually only asks once.

You’re sure you don’t have the whole line duplicated?

Should be:

input What is your name? | What is your name? | Done (YOU)
YOU
Hi, I’m [YOU]!

But not:

input What is your name? | What is your name? | Done (YOU)
input What is your name? | What is your name? | Done (YOU)
YOU
Hi, I’m [YOU]!

Unless there’s a label or something, if you do it the first way, it should only show up once. :thinking:

Oh there is a label, but I only have a label there in case the reader has a name of another character in the story to go back to the input label.

Hmmmm, maybe that’s circling it somehow. Could I see the code?

Sure!

Ah, you can delete line 52 completely. :+1:

That’ll stop the question from repeating, and the if-elif-else will still work. :grin:

Oh okay! Let me try that! :smiley_cat:

1 Like

Then again, if a reader types the name “Emma”, the story will say:

Emma is such a pretty name!
There is already a character named Emma. Please pick another name.

^ That would be fine, but if you’d rather the reader only see “[YOU] is such a pretty name!” if they’re allowed to use it, you can move the line:

NARRATOR
[YOU] is such a pretty name!

to the else section. :+1:

Up to you. :slight_smile:

Yeah I noticed that too. I moved that line to after else. And now it works perfectly! Thank you so much!! :cat_shocked:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.