Search code examples
app-inventor

Error when trying to convert sentence to Pig Latin in App Inventor 2


I'm trying to create a basic sentence - pig latin translator for my CSP class.

Both me and my teacher have gone over this and agree it looks as though it should work, but we could both be missing something simple.

enter image description here

It perhaps could be an issue with AI itself but I won't jump to that as a first conclusion.

There are multiple errors, each to do with either a select, remove, or replace list item, such as that

The operation select list item cannot accept the arguments: , [(The quick brown fox jumped over the lazy dog)], [The]

Thanks for any help!


Solution

  • The operation select list item cannot accept the arguments: , [(The quick brown fox jumped over the lazy dog)], [The]

    the error message is trying to tell you, that a select list item block needs an index as second argument, but got the word "The" instead... this happens, because the local variable item is a single word of your sentence, but not an index.

    enter image description here