The operation add items to list cannot accept arguments

The operation add items to list cannot accept the arguments: , [1], [2]
Note: You will not see another error reported for 5 seconds.
This issue is getting me tired, I've tried almost everything to solve it.
Here's the code:
image

What is "value" ?

The value of the tag from firebase

For example ?

image
2 = tag
asd = value

the code basically searches for the given tag and pastes it's value into a list

Are you initialising your global variable pckglist as a list ?

image

or a string

image

As a list of course
image

Ah, and the error only happens when i try to add a item to the list, the first one is added without problem

1 Like

I am unable to replicate your problem (even with adding a second item)

image

What is the procedure clear_value doing ?

Also you should set the listview/listpicker to Elements, not ElementsFromString.

Clear value basically deletes the symbols [ ] and " of the value
image

There you have it then, you are converting pckgList from a list to string. This is why it works the first time but not the second.

There is no need to do "clear_value", you can easily extract values from a list.

Still the same error :confused:
I'll send the .aia

You set the pckglist to a string again at the bottom of your if statement

image

I'll erase it then and check

Learn about using lists:

General Tutorials

It worked, now I noticed my error, tysm!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.