Good afternoon everyone. I'm a 101% newbie to programming, so my questions are probably pretty basic for you. Still, I want to ask for your help.
I am trying to create a random question screen from a list in csv. This screen is created from another that selects them in sequential order, from the first row onwards, and that works correctly.
My problem is that when it comes time to load the first random question that I am programming now, I get this error message:
I understand that the app correctly reaches the list of random questions that I am interested in answering. I give the button "start" and then "next", and here, instead of looking for the first of the questions in the temporary file and putting the corresponding options, put the first number of the list of questions in the question label random and, in the two answer options, the numbers 2 and 3 of that same list. When I click on one of the two, it tells me that the correct answer is number 4 on the list.
I know there is a point where the blocks go to the wrong place, but I have already told you that I am a total newbie at this and I do not know where the error is or how to fix it, and I am convinced that it is something very simple.
Here is the full block programming.
Since the error message says you are trying to get item number 305, that means you are confusing the index in a list with a value that might be stored in that list.
Double check how you are feeding your select list item blocks.
@Simon_Casas, at the "index" slot of "select list item" you are giving the input of the number which you would like to retrieve from the list, instead of the index at which the number is present.
I keep trying, and I see that the problem is:
When I create "preguntas.csv" the only information is the number of the row in the "UnaDeDos.csv" file. I understand that I should put one more block to pick the full information in the selected row and save it to "preguntas.csv". And here is where I can't continue.
Suggestions are very very gratefully welcome
I tried it, but I got no improvement.
The fact is that "preguntas_elegidas.csv" is created with only 1 row instead of 5 (or whatever I choose). Should I try to pick random items without creating a new list for them?