'sequence' in Corsi demo

Hi,

I’m trying to change the understand how the Corsi blocks demo on Pavlovia works, because I want to make some changes to it. The first change I’m working on is to have six blocks, instead of the five in the current demo.

I would have thought this is simple to do, but when I add another block to the list of blocks (blk6 in Figure 1) . But when I do this, all six blocks appear but only the first five blocks flash red, before crashing and giving the error:
currBlockName = sequence[blkIndex]
IndexError: list index out of range

I can’t work out why this happens. The code in Figure 2 looks like it should just work through each of the blocks. But I don’t know how the sequence[blkindex] works. Is this sequence predefined to be only the five blocks?

Thanks for your help!
Josh

Figure 1

Figure 2

@JKugel, I think you would also have to change the conditions file to include your extra block. The conditions file is where the sequence variable is defined.

1 Like

Ahhh, thanks @dvbridges