To be honest I didn’t fully understand your code sample, but in the following IF-block:
if(b>1 || l<Laenge)
b can still be 0 because it’s an OR statement, so later inside this IF-block the statements
new_Ver[n]=new_Ver_s[l,b-1];
new_UV[n]=new_UV_s[l,b-1];
will try to index at -1.
2
solved Array index is out of range but the index is zero and array length is 300