| Reference | Downloads | Github

Branching Routines --> If/Else working locally, but not on Pavlovia

Description of the problem: Eventually the task that I’m going to run is going to be a bit complex with lots of branching paths, but I made a toy example and still can’t seem to get it to run. I made it entirely in the builder since it seems to be a bit difficult to directly convert the .py script to PsychoJS (?).

In this toy example - there is an text input (‘y’ or ‘n’) and entering ‘y’ should enter screen 1 and then end. Similarly, entering ‘n’ should enter screen 2 and then end. It works on my Mac, but it doesn’t seem to work when uploaded to Pavlovia. Any advice is greatly appreciated. Thanks!

@sren1340, would you mind sharing the URL of your task, so we can see what is happening?

hope this works essentially, it’s just running through all the routines in order, regardless of the key entry. thanks!

@sren1340, I think this is an issue with where you have put the code. You will need to move the code block to the “Each Frame” tab, because in online studies, continueRoutine is always set to true at the beginning of each frame, and this will overwrite anything you have assigned to that variable beforehand.Try that, recompile and resync with Pavlovia, and also refresh your browser cache afterwards.

Yes!! Thank you so much!!