Help with Hackathon project - uistring.Error

Would anyone be willing to help me with this error for one of my students? It says - WARNING: Line: 28: setText() text parameter value (undefined) is not a uistring.ERROR: Line: 28: TypeError: Cannot read property ‘toString’ of undefined

Thank you in advance!

You are trying to display undefined where a string is required.

A couple reasons for that. One is calling filter() before you know what to filter on. Another is filtering on the artist name 1. Another is choosing a random artist based on lists of different lengths.

Help! My student has the same issue with the UI string error, but all of his code looks fine.
Here is the screen.

The first thing to test is if tomorrowsHighs is empty. You can set a breakpoint or a watcher. If it is then figure out why.

2 Likes

Thank you! It’s the little bugs. I checked and all of the filtered lists were empty in the watcher. It took a while but I finally noticed that the lists weren’t being filled because his conditional statement was missing the [i] to indicate which element should be appended to the filtered lists. His app is now working. Thanks again.