Creating an array of spheres

hello.everyone.I am struggling of creating an array of sphere and I have tried through “mmgs”.
image
while it completely cannnot work. Is there anyone can provide suggestions?

Heelo,

This ways to program is crazy,

the simple way is to build 1 mesh of sphere add after you just move the sphere to change the centre to
[ox[i],oy[0],oz[0]] for each i with movemesh function.

hello,
I have tried this method,
image
the procedure said that the Th3 does not exist.

Yes because the mesh Th3 is remove outside of brace

{
mesh3 Th3 = …
}
here Th3 do not exist (like in C++)