Bad arguments to + (The oparation + cannot accept the arguments: , [*empty-string*], [5]

i have facing Bad arguments to + (The oparation + cannot accept the arguments: , [empty-string], [5] this problem how to solve this problem. i have make video on block so please check this video. video link

You might be adding string and integer

If you have data something like this “5” in string and if you want to convert it to integer then you can use this extension:
com.anonymous.stringtoint.aix (4.6 KB)

You cant add an integer to a string. This extension will help you to convert the string to integer for example “5” to 5 only.

Java Code:

@SimpleFunction(description="To Convert String to Integer")
public int StringtoInt(String string){
int res= Integer.parseInt(string);
return res;
}

how to add please tell me

This is useless. Kodular, or other AI2 distribution, can convert String to Number class itself when needed.

2 Likes

Really :expressionless:
I didnt know that, so i always used this extension whenever it was needed to convert string to int

3 Likes

One of your addition operations is receiving an empty string.

Empty String - Nothing

You have to fix that

2 Likes

You have only a reading time of 8 minutes. First search the community. This has been asked before.

This post was flagged by the community and is temporarily hidden.

@Pro_King Your problem is something like that:

Can you publish your blocks here so that we can look at the blocks and see where is error??

1 Like

Don’t use all capitals. That is like shouting and we don’t shout here. Don’t do that again.

4 Likes

No need to shout…

4 Likes

A few days ago I faced the same issue:
What I can say is, that there must be a math operation somewhere and the procedure wants to add 5 with , and this is not possible. This empty may be a variable, but the variable is not set yet or set wrong, something like this.

So search your math blocks where you have the block below and show this blocks here.
image

3 Likes

i added video link please check

Please instead of posting videos post your blocks. Some where you are using an addition block. Isolate those blocks , download them as png and post them here

image

5 Likes

Get value is an empty string, most probably you are not getting any value from firebase. To check it just add a label and see

image

4 Likes

image

Hope you did not forget to call the Firebase Value.

4 Likes

bild

If no tag, empty string

2 Likes

yeah, so if no tag, “empty string” value. and if value is not number, get error message. this is expected.

OP can also use 0 instead of empty string, but will never receive an error message then.

1 Like