I stored a name of the selected object using-
CODE
string surfaceName[] = ls -sl -o;
then later on in my script, i wanted to store the position of a random vertex on that object mentioned before using pointPosition -
CODE
float $vertPos[] = pointPosition $surfaceName.vtx[$randomNum];
However it returns with,
CODE
Error: Too many arguments. Expected 1, found 2
I know it has something to do with using $surfaceName as it works if i type the actual name of the object instead. But i need to be able to use this script with any name.
Any ideas?
Thankyou
ps. on another forum, i was suggested to do this-
CODE
float $vertPos[] = pointPosition ($surfaceName+".vtx["+$randomNum+"]");
but that returned-
CODE
Error: Illegal operation "+" on data type string[].