I need to randomly change the color of a stimuli in test trial I get: Error ("TypeError: Math.random.randint is not a function

You have a test for equality if target_name == clicked_stim: which appears to never be true.

In the line above add:

print('Does',target_name,'equal',clicked_stim,'?',target_name == clicked_stim)

and check the developer tools to see what happens.

1 Like