Error: expected '}' before 'else'

Need help :slight_smile:

1 Like

Put a “}” before the word “else” on that line.

The braces (these things { }) need to be matched. I’m on a Chromebook at the moment so I can’t load up the IDE to check, but I would expect it to highlight the matching open or close braces when you move your cursor onto one.

Hope that helps :slight_smile:

2 Likes

The screenshot was great to see the error message and location, but it might also help in future to copy and paste the code text so that we can modify it for you in a reply.

1 Like

Interesting I love/hate brackets and yes the IDE you’re using could help. I’m not an Arduino beast ( at least not yet :japanese_ogre: ) but back in the day a switch statement carried less overhead and really cleans up your code. Personal preferences and would like to know for myself and future coding for Arduino

If someone with Arduino would clarify… Just my 2 cents

Thanks for sharing, we will fix this issue ASAP.

Cheers,

Maayan

1 Like