argument error (Bad arguments to + The operation + cannot accept the arguments: , [asdf], [1])

31 views
Skip to first unread message

Lim Gayoung

unread,
Nov 27, 2019, 11:24:41 AM11/27/19
to MIT App Inventor Forum

s2.PNGscreen1

s3.PNGscreen2

s4.PNGscreen3

s1.PNGscreen4




Hello.

I'm having a problem - when ever I try to click button 4 in Screen 4, an error message appears.
If I write "asdf" in TextBox1 in Screen4, the error message says: 

Bad arguments to +

The operation + cannot accept the arguments: , [asdf], [1]


Please help me. Thank you.

Evan Patton

unread,
Nov 27, 2019, 2:22:11 PM11/27/19
to MIT App Inventor Forum
If you're planning to use the content of TextBox1 in a math operation, consider turning on the NumbersOnly option so that the user of the app can only enter valid numbers. If you're intending to concatenate the string "asdf" and the number 1 in order to get the string "asdf1", use the join block in the Text drawer rather than the Math's + block.

Regards,
Evan

Reply all
Reply to author
Forward
0 new messages