The operation - cannot accept the arguments: , [*empty-string*], [1]

Please help me some error show in my thunkable please tell us how to fix this problem.

Bro, what are you doing and what are you trying to accomplish?? You are using so many buttons. Any more insight on the problem or what you are trying to do would help

i make a task app i added a 20 buttons when click button 1st other buttons not enable and show the ads when ads loded goto home button then 10 second timer start after the timer end button 2 enable same process 20 buttons … sir

Why not just use a single button instead of 20 buttons.

So that initialy the button should be enabled. If user click on the button, ads Should load. If ads load, (that is ads after loads event, set button to disable, set timer =true. If timer = true, set button to enabled and set timer_enabled to false)

If each of the 20 buttons comes with a special gift after each is clicked, you can still use a single button with a Global variable that counts to the 20th and then resets to one if get Global variable= 20.

I hope am making sense. Don’t know what exactly each button clicked would do but am sure a single button would do to simplify your code

1 Like

Hi @sohal7052,

Thanks for your question, it really helps to have an error message and a screenshot of your blocks.

The error message is actually telling you where the problem is:

The error **The operation - cannot accept the arguments: , [empty-string], [1] ** means that when you subtract 1 from timercount.text there is nothing there to take anything from. My guess would be that the timercount label doesn’t have any text in it…is this correct?

1 Like

@sohal7052 yes sir @Domhnall is right . set timercount text to 59 in designer , then it will not show error

how to solve this error

Why are you asking this as an addition to a 2 year old dead thread?

The “replace all” text function requires 3 arguments: the original text, the segment to be replaced, and what the segment it needs to be replaced with. Clearly, you did not supply anything as replacement.

Care to show your logic block?

please help me solve the error i have provided the blocks

You should ask in App Inventor 2 forums.

I notice that the place where the instruction that is causing problem is in clkTimer.Timer. That is where there is an attempt to replace “phone” with the value of ‘global whoPhone’.
The only place where ‘whoPhone’ is assigned is in phnNotification.PhoneCallStarted. If the call is not started, then ‘whoPhone’ should retain the original “0” text value of the initialization, unless there is another block somewhere doing something with it that has not been shown.

Have you considered getting the value of ‘whoPhone’ out (using a notify) so that you could at least verify that it is properly assigned, and also have it reported out in the block that tries to use it?
Also, have you noticed that, in the clock that tries to use it, you assign the value of “staycount” to 0 if it is equal to 10, before assigning the SAME “staycount” variable the value of “false”?
A bit further, you are dealing with another variable, staycount2, but this one you use in increment staycount, so staycount2 would NEVER increment.
Finally, I do not see anywhere the start/stop or interval of the clkTimer being defined, so assume it is set in its definition. The problem is that it may end up firing multiple times, or do so before anything is ready.



Thunkable is a superset of App Inventor, so any explanation offered here is likely to apply there as well. Second: I do not see why the mere fact of having done the screen capture on a different system invalidates the legitimacy of a call for support. That this user just joined indicates that he possibly did not get any valid support on the App Inventor site; I, for one, haven’t been there in months.