Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

One Loop Nested in another Loop breaking Issue

I have an experiment with nested loops, I am trying to break the inner loop only, which will then run back to the next item of the outer loop. However, when the inner loop is broken with a keypress, the outer loop also breaks. This means that the outer loop only runs the first item in the table, and then goes onto the end of the experiment. I used break_if in the inner loop set to a correct keypress, but the outer loop is set to break_if never. I am looking for a way to structure the items so that when the inner loop breaks, it brings up the next item in the outer loop.

Any help you all can provide is much appreciated.

Comments

  • Hi,

    How did you implement this? Can you share the experiment (preferably as simplified as possible)? What you describe shouldn't happen ideally.

    Thanks,
    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    The outer loop of the experiment contains a series of different pictures, which are referenced on the test phase sketchpad item. The program is designed to run through all of these photos in a random order (break_if: never). The inner loop contains a series of duration at which the testphase item is presented at. These must be sequential, in a progressively longer order. When the participant is able to identify the picture presented, a keypress breaks the inner loop (break_if: [response] = w). When the inner loop is broken, the program should move onto the next item in the outer loop, starting at the first duration of the inner loop for a new photo. However, for some reason, when the inner loop breaks, instead of calling back to the outer loop, the program runs as if the outer loop does not exist, moving to the THE_END sketchpad item. I have tried playing around with breaking loops, and it appears no matter what structure exists around a loop, when it is broken the program moves onto the closest sketchpad item below it, regardless of any other loops.

    I have worked around this issue by creating separate loops for each photo, which removes the need for the outer loop. However, this makes the program load slowly, so if you have any suggestions on how to make the nested loops work as intended, that would be wonderful!

    Thanks for your help,

    Harrison

  • Hi Harrison,

    Well, as far as I can see, the THE_END sketchpad is the next item in the outer loop, once the inner loop is finished. So given your description and your screenshot everything seems to make perfect sense. You also don't have an outer loop sequence. So until you have set up the outer loop properly, I don't think it is going to work.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    I apologize for the quality of that screenshot; it did not make the structure of the program clear

    Here you can see that THE_END sketchpad item is not in the outer loop (with it minimized), it is the item after the outer loop. And so if the outer loop is set to never break, the program should run through all of the photos in the table in the inner loop before moving onto THE_END.


    Here I added an outer loop sequence. The program still breaks the outer loop after the first run of the inner loop, and moves onto the THE_END sketchpad.

    Any suggestions you might have would be much appreciated!

    Harrison

  • Hi harrison,

    Can you share the experiment with us? Maybe even a simplified version that still shows the same behaviour? This will speed up debugging a little,

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games