I have a few questions

I'm doing a exam app

When the button is clicked and the result is obtained, continuing to click the button will also increase the number of questions answered, even if I do not proceed to the next question.

So do it this way -
image

This way after 1 click, the button gets disabled.
No chance of clicking it multiple times

That's really helpful.

Thank you!

But now I have another quest.

Suppose I have 100 questions, and I have built a function to jump to a specific question, how can I avoid errors?

There have been two types of errors.

  1. Bad arguments to - (when I type blank and click bottom)

2.Select list item:list index too large or small (when I type -1 or bigger than 100)

image

Use this type of if condition

-1 will for sure give errors because the smallest index is 1.
About 100, I have never tried creating such a big list, but i dont think that should be a issue.
The error might occur when you are trying to retrieve a 100th item from a list containing 99 or less items

Yeeeeees! I always get an error when I extract question 101 from a list of only 100 questions.

Is there a way for him to pop up a text box to remind the user what to do?

Why would you like to retrieve index 101 from a list of 100?
Can you share your blocks?
Also look here -

I would like to make sure that if someone enters a value incorrectly, it will not cause an error message to appear.

Thanks again for your help.

image

Add an IF condition like this before this block -
image

Finally, I changed the block to this and it works fine.

Thank you very much for your answer so I could finish.

(Although I still don't know how to get around the -1 problem.)

Where is this problem occuring?

If I type -1 in the SkipTextbox and click bottom

Don't accept negative integers.

Try this block of code

I fixed them, like this block

Beware of 0 values too in your tests.

Also, length of list() is more flexible than hard coding numbers like 100 or 505.

1 Like

Off Subject but I need a celebrity name. Do you guys have any ideas? please not to girly!