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

已查看 31 次
跳至第一个未读帖子

Lim Gayoung

未读,
2019年11月27日 11:24:412019/11/27
收件人 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

未读,
2019年11月27日 14:22:112019/11/27
收件人 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

回复全部
回复作者
转发
0 个新帖子