Script error on my pavlovia experiment on tablet

This is the code in begin routine and the code in each frame is this one

mouseLoc = mouse1.getPos()
if t < .05:
     pass
elif mouseLoc[0] != mouseRec[0] or mouseLoc[1] != mouseRec[1]:
     mouseRec = mouseLoc
     if img1.contains(mouse1):
          response = 1
          continueRoutine = False
     elif img2.contains(mouse1):
          response = 2
          continueRoutine = False
     elif img3.contains(mouse1):
          response = 3
          continueRoutine = False
     elif img4.contains(mouse1):
          response = 4
          continueRoutine = False

Change your Begin Routine code to:

mouseRec = mouse1.getPos()
response = 0

This was the code I had at the beginning, which you gave me earlier in the forum, and it did the same thing.

If you keep your finger on the screen then you will probably end a trial every 50ms.

Increase this number to the minimum reasonable reaction time to give time for the finger to be lifted.

1 Like

it works thanks !