Getting a error - List index Smaller than 1

i am getting a error while inserting a item in a list.

please check my code.

blocks (80)

Show more blocks for reference.

1 Like

Index will always be int. Maybe you are giving string as index.

1 Like

no, i am getting a int.

That’s why you are getting an error. You have to put that item at certain position inside the list, and it should be int.

1 Like

hey it is already a INT

Also, you are missing else block.
You have filled if, then but missed else.

then, what i have to put in it.

because i don’t need of else

If you don’t need then you should not use that. Otherwise, it will throw an error. I did not see it at first, now I see it.
You can use blank text block to return null. Try it. :wink:

1 Like

i have do some changes
can you check .

blocks (85)

Did you test your app in the companion? These blocks seem right. Test it.

1 Like

wait… installing

not working please help me

Can you share your AIA file, so that I can look for mistakes?

no, i can’t

Multiple issues in your blocks

1. What purpose does this block do

2. What number does this one return

3. If the previous block returned number such as 5414696438854, how do you expect to insert it in to a list that contains only 2 items in the list

i have using add items to list.

Answer this