The operation yail-divide cannot accept the arguments: , [*empty-string*], [120]

Hi. I suddenly got this message “The operation yail-divide cannot accept the arguments: , [empty-string], [120]” after I change background colour for “total_formula”. Before this, it works well. Please help. Thanks.

there is no enough information in your query. please explain properly…

This app is for calculating how much dose for u to take based on your weight (kids only)

  1. Spinner1 (option to choose 3 types of paracetamol, each types have different calculation)
  2. berat_badan (body weight (less than 50kg only))
  3. padam (clear)
  4. Kira (calculate)
  5. keputusan (answer), if choose 120mg/5ml paracetamol :
    formula: 15mg/kg of paracetamol,
    so,
    15mg x “body weight, (eg: 10kg)” = 150mg,
    then,
    150/120 x 5ml = 6.25ml

if choose 250mg/5ml paracetamol :
formula: 15mg/kg of paracetamol,
so,
15mg x “body weight, (eg: 10kg)” = 150mg,
then,
150/250 x 5ml = 6.25ml (6.25 is the answer “keputusan”)

  1. berat_badan (body weight)
  2. 15mg x “berat_badan” (The answer is 150mg paracetamol)
  3. 150mg paracetamol (based on answer from no.7)
  4. if choose 250mg/5ml paracetamol, so “250” will show up
  5. “keputusan” (answer)

Maybe besides bgcolor, you accidentally changed something else? Did you change it from designer’s properties or from blocks ?

I just replied

I didn’t realize if I have changed something. I changed it from Designer’s properties

Can you try changing this block to any math number block

blocks (4)

Use Do it to debug your blocks, most probably berat_pcm_formula is empty

I don’t understand. Can you show it to me? Sorry I’m a newbie

still same

Or temporarily when click set total_formula test to berat_pcm_formula2.text to see the result and check if it empty

do it

it shows like this, so what should I do?

1 Like

How do you calculate berat_pcm_formula2 ?

berat_pcm_formula2 is no.8 (duplicate from no.7) *see app screenshot above

berat_pcm_formula2 is just duplicate from berat_pcm_formula

below is the Do it from :


do it 3

So actually the problem is caused by berat_badan.text

So how to fix it?

@dora_paz Here is the aia file. Could u explore it and tell me the correction?
pcm dose.aia (10.0 KB)

1 Like

Check this one

pcmdose2.aia (10.1 KB)

1 Like

Move blocks to top

3 Likes