Help needed for: "replace list item"

I try to replace a text with a string of numbers and then translate it into morse code but the "replace item list" does not work and gives me an error like this:

I don't what I'm doing wrong... PS:I'm a beginner
Here is my program:

Try with:


Looks like your text1 list has a sublist:


ok i will try that, thanks

it doesn’t work either, but I have another error message now:
"The second argument to foreach is not a list."
So maybe it wasn't a sublist :confused:

Could you share your project as an aia file, I can take a look for you

I tried with a "remove liste item - index 1" just before the "for each" but it's the same as the first error but now H as gone

sure here it is:
Morse.aia (83.0 KB)

Thanks, give me a few minutes....

No problem, thank you very much!
Also some texts may be in French, but I tried to translate everything quickly.
What i'm trying to do at the end is to translate the text in 0/1/2/3 then read it

OK, found it, me not paying attention! In the replacement block you have item as the index. This won't work, you have to get the index of the item :slight_smile:

See blocks

oh ok! I get it, thank you very much!

I also see you have a "delay" procedure. This probably will not work for you, and cause problems with your app. You need to use a clock timer event. Search the forum for "delay" to get some answers about this.

no the delay works fine for me but now with the replace list gives me an other error, "The operation replace list item cannot accept the argument:" do you know what's wrong now? :confused:

  • the first later is gone for no reason...

Good luck with that have been warned/advised

Please show your blocks in relation to the error, including the text from textbox1

well the error only display on my phone:

but i think it still is the "replace list item"...

Blocks...I believe you are still removing the first item from the list before iterating

No i have the exact same blocks that you showed me:image_2020-12-21_155932

With regard to delays, this topic has all the information and links you may need:

ok thanks i will fix that asap