Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

modifying a script

Hello!

I need help again with modifying a script slightly. before I had a matching paradigm with three cards. It looked like this. The bottom cards would turn over to reveal two different picture (ie. A, B) and the top card would turn over to reveal either A or B. The participant is tasked with touching one of the two bottom cards that depicts the matching picture to the top green card. It is a very simplified version of the memory game.



The script I used looked like this:

each pair of cards object 5 and object 6, object 7 and object 8, object 9 and object 10 etc would be randomly assigned to either the right or the left bottom card and then one of the two would also appear in the target card position.


Now, I would like a similar paradigm but with four cards total instead of three. I tried my best to modify this script but I am getting an error saying

The script I modified looks like this

I also attached the project. Any help would be very much appreciated!! Thank you so much in advance.


Best,

Mollie


Comments

  • Hello,

    I am still struggling to make this work. If anyone would have any ideas it would be greatly appreciated.


    thank you,

    Mollie

  • Hi Mollie,

    from January to October still the same problem. That's tough.

    Your error message tells you that there is a problem in line 39.

    I guess it is the 'target_side[i]' what makes your problem.

    Probably 'i' runs longer than the number of values in your list. Suppose that your list contains three items (lst=[0,1,2]), but your for loop goes from 0 to 4 (4 is the number of targets that you have). So the script can not continue as it does not find the fourth item in your list.

    Check out the very upper part: How many items are there in each of your lists? target_side and target should be the same.

    Hope that helps you out.

    Stephan

  • hi @Mollie_H

    Did Stephan's advice help? If not, I can also try to have another look into your issue.

    Best wishes,

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.