Hi Erin!
You are going to need to define a
domToMutation and a mutationToDom method on your block. A good example of how to do this can be found in
logic.js. These functions provide a way to save and load the changes that are made during a mutation. In your case you would want mutationToDom to save in xml how many statement inputs you have added and domToMutation to create a block with that number of statement inputs.
The error you are getting has to do with insertion markers. Insertion markers are the gray blocks that show up when you drag a block around. The insertion marker is essentially a copy of the block that you are dragging. When it copies the block it also applies any mutations from the block you are holding onto the insertion marker. (In your case it would add an extra statement input to match the block being dragged). If we don't define the above methods then the insertion marker and the block get out of sync, which is causing your error.
Hope this helps and feel free to respond if you have any other questions : )
Abby