psychopy.org | Reference | Downloads | Github

Routines not working on pavlovia

URL of experiment: https://pavlovia.org/APL_Lincoln/arousal-and-decision-making

Description of the problem:
I have an an experiment, part of which is not working on Pavlovia (worked fine offline in Psychopy 3)

The part of the experiment is a fixed gambling/coin prediction tasks. Participants are asked to predict the outcome of a coin toss (press a for heads or k for tails) the answer is pre determined and they will always be told right or wrong on a specific trial no matter their guess (e.g. the first 6 they are told they are correct not matter what). Their scores count up to a specific score then they start to lose. They bank their points at anytime by pressing b and moving on to the next stage.

When ever they guess they should get a message that says “Heads/tails: you are correct/incorrect” your score is: ‘score’. When I run it on Pavlovia the response in “Undefined: you are correct/incorrect” Your Score in NaN.
When the bank button is pressed instead of ending the routine and moving on, it loops back.

Some changes were made from the off to online version. All the components were defined in variable components in an initialise routine. This has now been disabled and the values put into begin experiment tab in a code component. It has accepted the defined values for the keys (a, k, b) but not the other values.

I’ve tried using a thisExp.addData (thisExp is defined in a begin experiment tab) for the variables it is missing out (the score, the coin result and the bank) in the code component in both a begin and end routine but to no avail.

Can you provide more info? it is hard to help given your description. Can you elaborate more on how you have coded each part separately?

its okay, we managed to get it working. thanks for the reply