So I started trying to terminate the inner loop by using the code,
myloop.finished = true;
It caused the outer loops to terminate instead, so I looked in and instead added the code:
trials.finished = true;
continueRoutine = false;
This gives the error that both trials is undefined and so is continueRoutine. I have 3 loops that hold about 5-6 components, I am unsure if this is due to having so many loops.