Problem with condition assignment using _subject_parity_
Hi there
I am pretty sure this is a simple thing but, for the life of me, it's driving me crazy! I am trying to do condition assignment with the participant number (subject_parity), so one set of participants sees one sequence (blockloop1) and the other group sees a different sequence (blockloop2). It all works very well with odd numbers but not with even numbers. If I change the order, the error switches to the even numbers, so I know it has something to do with the evaluation order of the variable. Does anybody know why this would happen? any suggestions?
When I try the even numbers, it gives me the error message x should be int or float, not z but this does not make sense to me since subject_parity type is unicode. I tried defining it in an inline script, using a not(odd), and all sort of silly variations that don't work.

(I am running Opensesame 3.2.4 on a 64bit Windows 10 machine and I know next to nothing about python)
Comments
Hi azrael,
From the Manual: https://osdoc.cogsci.nl/3.2/manual/variables/
subject_parity Is 'odd' if subject_nr is odd and 'even' if subject_nr is even. Useful for counterbalancing.
Have you tried
[subject_parity] == 'odd'?Another option: [subject_nr]%2 == 1 #divides by 2 and gives the rest, also helpful if you have 3 groups
Maybe that helps
Stephan
Thank you!!! Sorry for the late reply, your first suggestion worked perfectly!
Cheers Stephan