trials.thisN / currentLoop.thisN no longer working in 2020.2.3?

The next error I’m trying to fix seems to be related to a failure in .thisN

I’m trying to present a list of words and it keeps presenting the same item.

Debugging has shows that trials.thisN and currentLoop.thisN both have a value of 7 for all seven iterations. If I change the name of the loop from trials to trials_x the value of trials_x.thisN was 12.

I’m upgrading to 2020.2.4 in the hope that I don’t have to use a dummy variable to count loops in code that worked in 2020.1.3.

Still an issue after an update.

text_2.text=wordTrials.thisN+’ '+theseWords[wordTrials.thisN]

gives the same value (7) for every iteration.

@wakecarter Has this been fixed in 2020.2.5? I’m trying to use this following code to present an encouraging message after a certain number of trials and it doesn’t seem to work. Code is in the end routine tab. Text component is below the code component in the routine. Routine is in the loop called ‘Sensory Trials’.

 if (SensoryTrials.thisN==2):
    msg='Good job keep going!'
else:
        msg=''

Or am I just doing something wrong here?

Sorry but .thisN still hasn’t been fixed as far as I’m aware.

1 Like