The operation pick random item cannot accept the arguments: , [“”]




I'm trying to make a quiz, and I don't understand why it works on the website but not on my phone, it always shows the message " The operation pick random item cannot accept the arguments: , ["''} "

This is how it work,

image

but, in you code, pick a random item will return a element not a list, since perguntas is a list of items only, not list of lists (yes, it may work with alternetivas, which is list of lists)

1 Like

...in addition to mareshu's notes, I'm not sure your 'while test do' is right - try 'If then'

Sorry, I interpreted it wrong, here is the reason behind the error, block sequence is not correct,

It should be like,

You will find error only first time when you initialized first time only, in second initialization TiniDB will have something ready to serve you, since variable is initialized with empty string and then tinydb is filled with values.

And to avoid this error you need to swap the blocks, or need to prioritize them. as

1 Like

If you have a Block List, make sure you have 'List' in it's name, then everyone, including yourself, will find it easier to understand your code.

https://www.professorcad.co.uk/appinventortips#TipsGui