I have made various scripts that work with GMAT, but once in a while I get an "ArrayTemplate error : dimension error" error. I do not know what causes it, as in this case my script appears to be correct (it is a multiple-shooting/patch point script, and all the trajectories appear correct and meet at the patch points). There is zero information about it online, so in the context of GMAT's code/functionality, what causes it throw that error?
The only way I've been able to replicate it/force GMAT to throw it in other, working scripts is by using a very high perturbation value in the vary command, which isn't the case here. The only references to it online are in this source code file from GMAT's Sourceforge page, and this page from the same place, both of which I cannot interpret.
My theory: I assume that "array" in this case refers to the state vector of the spacecraft, so maybe this is an error relating to the spacecraft being in some kind of non-physical/mathematically undefinable trajectory (like asking GMAT to propagate the spacecraft to periapsis, but constraining the true anomaly to 350 degrees)? But this doesn't change the fact that this doesn't seem to be the case here.