# Problems with conditionally continuing a routine after updating to the latest PsychoPy version

**URL:** <https://discourse.psychopy.org/t/problems-with-conditionally-continuing-a-routine-after-updating-to-the-latest-psychopy-version/10055>\
**Category:** Builder\
**Created:** [November 26, 2019, 8:54am UTC](https://discourse.psychopy.org/t/problems-with-conditionally-continuing-a-routine-after-updating-to-the-latest-psychopy-version/10055 "2019-11-26T08:54:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilly](https://avatars.discourse-cdn.com/v4/letter/l/ed655f/32.png) [@lilly](https://discourse.psychopy.org/u/lilly)\
**Post date:** [November 26, 2019, 8:54am UTC](https://discourse.psychopy.org/t/problems-with-conditionally-continuing-a-routine-after-updating-to-the-latest-psychopy-version/10055/1 "2019-11-26T08:54:53Z")

</div>

**OS** : macOS 10.5  
**PsychoPy version** : 3.2.0  
**Standard Standalone? (y/n)** : Yes  
**What are you trying to achieve?:** I have a variable `level` which is equal to 0 or 1. One of my routines should only be displayed if `level = 1 `.

**What did you try to make it work?:** In a the Begin Routine tab of a code component in this routine, I put

```auto
if level == 0:
    continueRoutine = False 

```

**What specifically went wrong when you tried that?:** Before updating to the latest version, this worked fine and the routine was only displayed in trials where the level was equal to 1. Now the routine is displayed in every trial, irrespective of the variable `level`.

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [November 26, 2019, 10:06am UTC](https://discourse.psychopy.org/t/problems-with-conditionally-continuing-a-routine-after-updating-to-the-latest-psychopy-version/10055/2 "2019-11-26T10:06:01Z")

</div>

Hi @lilly, this may be related to a regression in this functionality (soon to be fixed in the next release = see [previous post](https://discourse.psychopy.org/t/continueroutine-false-in-begin-routine-tab-has-no-effect/9801/4)). To fix in your current version, move this code to the “Each Frame” tab.
