How do I define a variable with Text in it?

Hi, I need help for setting a variable to text. My goal is to create a Textbox that contains the name of a player. Anyways, it´s not working. I´ll just show you the strcuture of my relevant blocks.
blocks (8)

the problem is that if I click Start, the Label doesn´t switch to “Welcome “(Content of Textbox)””, it just says “Welcome”"".

This might be part what you need to do


or something similar. You cannot assign the value of a TextBox in the initialize global. Will the blocks I re-arranged work? Probably not ... I can't re-arrange everything and test. Only you know what you want and expect to happen.

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorials for more tutorials.

Regards,
Steve

1 Like

Thank you very much, I just didn´t think of that! Now it´s working.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.