Conditional filtering with code but not running

The code like this

if(key_OldNew.keys == 'c'):
    doRK=1
else:
    doRK = 0

and I also build a trails
nReps $doRK
Others are default

There should be no errors in the coding, but the experiments don’t run, what’s wrong with them?Their previous steps work fine.

You’re missing a space after if, you also don’t need those brackets but this should be fine

Thank you. And I tried many ways then realized that $doRK in nReps has to remove the $, maybe because nReps already has a $ sign in front of the window by default. As well as I was following an instruction to do it, but the video didn’t remove $ from it.

So is it working now?

Yes

1 Like