expression error
Moderator: Martin
-
- Posts: 5
- Joined: 08 Jun 2018 13:49
expression error
Hello, i need help, i wanna make a choice dialog, but it also made on input dialog, I know how to make the expression if the selection was selected, (i type this thing > "value[0] = 1," Or "value[0] = 0"? If yes, let me know) But its Going to FALSE And EXPECTION Connection, How Do I Fix It?
Re: expression error
Input dialog will stored the result in value. If you have several choice : apple, banana, cherry. When you pick cherry, value will have the value of "cherry". The expression to check it is
Remember, it is double equal sign (==), not single. if value is cherry, then it will result in true. Any other value, will result in false.
You can't use value[0] here, as value is just a string (text), not a list (object). Using index function to a string will result in error exception, stopping the flow immediately.
Code: Select all
value == "cherry"
You can't use value[0] here, as value is just a string (text), not a list (object). Using index function to a string will result in error exception, stopping the flow immediately.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 5
- Joined: 08 Jun 2018 13:49
Re: expression error
Thank you so much for telling me :3