You are confusing a range variable (sort of implicit loop) with a vector (a collection of individual values).
Indices and "last" elements exist only for vectors. But the variables S and B you defined are ranges and in Prime 10 and above also s and b remain being ranges!
Are you trying to redo what someone else did in an older version of Prime? In versions of Prime up to V9 an inline evaluation as seen in your picture converted a range into a vector. In Prime 10 and above this does not work anymore.
I also don't see any need for the definition of the variables S and B or s and b.
Simply use Q:=CreateMesh(q3D,1,3,1.2,5,21,20) to get the same result.
If you really need to convert the ranges S and B to vectors s and b you may use the small utility function range2vec which was posted here in the forum a couple of time. Starting with version 11 of Prime you should rather use the new built-in function "vec".
See for example Re: This value must be a vector in MPC10
Here in more detail:


Prime 10 sheet attached
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.


