Bad arguments to select list item - the operation select list item cannot accept the arguments:

If your global data contains many sublists in this format, then you are approaching in wrong manner/blocks. If this is your structure then you must try as below instead of loop

for each items in the global list 
Add items to the list global or local lan
Items select list item list (get item) index 2
Add items to the list global or local Lin
Items select list item list (get item) index 3

If it is not pls show us your global data to us.

This will work only if you are not using select first items intofrom the global data

I tried the for each item block too. It also complains that it is not a list, so similar problem. I will try again.

Better remove all blocks, in screen init after the open database catch the first query function into a one lable then show us the result to us..

Else this topic will go on without knowing your output. Just imagination only we can suggest.

Then use split text at ,
In the above blocks (for each item event) instead of using get item into the event try to use split text at , get item

I go to bed and try again tomorrow. Thanks for all the help.

So in the end it seems my triplet lists that look like this [default, 39.57128145106525, -7.635200049198133] are not recognized as lists. Then what are they? and how do I make them lists to extract the info? They are not strings either and I can't split them. They have been produced by simple sqlite through the SELECT statement you can see in the code. I really haven't got a clue how to solve this...

I notice you are using my Simple Sqlite extension. Are you using the latest version (V3). This has a "ListFixer" block built in to the extension to convert what looks like a list to an AI2 list. (There was a separate extension containing the list fixer for earlier versions, but this is now obsolete.)

This issue has always been included in the extension documentation....

I will try that. I can't see a version number and I installed the extension from another computer so I don't have the file.

I noticed in my list, the first element is a string but it has no quote marks. Could that be causing the problem?

No, the problem is as I have indicated in the documentation.

Upgrade to the latest version of the extension here, and use the listFixer block on your select queries.

image

Listfixer has done the job. You can't imagine how happy I was to get 'true' for the 'is a list' block. Thanks a lot TIMAI2 , great extension!

1 Like

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