Stuck on choice coding (curly brackets)

Hi guys! I am getting an error saying “there is a { on line 2470 that does not have a matching }” I’ve looked everywhere for the solution but I still can’t figure out what I am doing wrong! Any help would be appreciated!

This is the format, try putting “Duck” { next to choice

choice “option1” {

} “option2” {

}

Or, when u start typing the word choice, select the snippet that the app suggests you and just change the words

there are 2 end brakets on the first choice } this

also you can not have an empty space between the end braket and the next choice. it has to be right after

example dont do this

}

“option 2” {

do this

}
“option 2” {

I see two issues here:

  1. You put two curly brackets: first in line 2478 and the second in line 2480 when you only need one.
  2. You have to put the options right after a curly brackets, like this:

choice
“Option” {

}
“Option 2” {

}

Not like this:

choice
“Option 1” {

}

“Option 2” {

}

That way the script doesn’t see the option belonging to the choice and gives you an error.
Hope it’s understandable.

Not relating to the brackets, but I think messageReader should be readerMessage (or at least that’s what I type).

4 Likes

You’re right!

Thanks for all the help guys! It makes more sense now. Turns out the messageReader vs. readerMessage made a difference as well! Really appreciate it! :blush:

Sorry, have another question! I have fixed all the curly bracket errors but now it’s saying “Unexpected SHOW_TOAST: with one of my readerMessage’s” Not sure why??

1 Like

Can you post a screenshot please?

Yeah, this is it!

You need the @ sign on line 2571

Oh my gosh, of course! What a rookie mistake. Thanks for your help! :grin:

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