i dont know why dont work i need use the block list thing? list to get if the word is or not in the sentence
there are my blocks and the aia
extract_word.aia (2.2 KB)
you have forgotten to break the loop after the word has been found
just add a break block
https://ai2.appinventor.mit.edu/reference/blocks/control.html#break
break
When looping using the for range, for each, or while blocks it is sometimes useful to be able to exit the loop early. Thebreak
allows you to escape the loop. When executed, this will exit the loop and continue the app with the statements that occur after the loop in the blocks.
Taifun
its ok, the position of my break?
No
Taifun
but i make that and its not working correctly
What about using the “contains text” block?
Would be a lot simpler.
using the same blocks but replacing the block list thing? list? its correct? or how would be?
I do not have a pc right now to show you, but at the text slot you put textbox2.text and at the piece slot the textbox1 text. If true the text in textbox2 contains the textbox1 text, otherwise it returns false. Check the documentation!
i change using your guide but i get that the word isnt there but the message will be show that the were is there in the sentence what is wrong?
i make using your guide you can see in my block but its not working correctly because i get in the message that there is not the word in the sentence but the message is wrongm the correct message is that the word is there.
some help about this?
You did not read what I said. You do not need the list blocks. Only the text block. One simple block instead of everything else.
ok thanks
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.