So - I 'guess' that the code breaks here:
for (int i = 0; i < cpt-1; ++i) {
for (int j = 1; j < names.Length+1; j++) {
nv_data [j - 1].positions [i].x = float.Parse (datas [i] [j * 3 - 2]);
nv_data [j - 1].positions [i].z = float.Parse (datas [i] [j * 3 - 1]);
nv_data [j - 1].positions [i].y = float.Parse (datas [i] [j * 3]);
}
}
If breaks because something that is not a float get into datas[i].
If that is the case then you need to test the datas[i] string to ensure that it is a float. You can do this:
for (int i = 0; i < cpt-1; ++i) {
for (int j = 1; j < names.Length+1; j++) {
float x, y, z;
if(float.TyrParse(datas [i] [j * 3 - 2],out x) &&
float.TyrParse(datas [i] [j * 3 - 1],out z) &&
float.TyrParse(datas [i] [j * 3],out y)){
nv_data [j - 1].positions [i].x = x;
nv_data [j - 1].positions [i].z = z;
nv_data [j - 1].positions [i].y = y;
}
else{
}
}
}