Meecho
04-05-2007, 12:22 PM
I stored a name of the selected object using-
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 -
float $vertPos[] = `pointPosition $surfaceName.vtx[$randomNum]`;
However it returns with,
"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
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 -
float $vertPos[] = `pointPosition $surfaceName.vtx[$randomNum]`;
However it returns with,
"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
