Thr3ddy

06-14-2005, 05:56 AM

This is my first attempt at MEl and I'm getting the feeling that I did something totally wrong with my script since I get the: //Error: No object matches name: // error. Could you please take a look at it and help me out?

global proc CreateCurve(int $numVerts, float $curveLenght)

{

int $numVerts;

string $curve;

float $calculate;

float $curveLenght;

string $array[];

float $calculate = $curveLenght / $numVerts;

if ($numVerts < 1 || $numVerts = 1)

{

int $arraynumber;

int $arraynumber = 1;

float $newfloat;

do {

$array[$arraynumber] = "-p 0 0" + $calculate + " ";

$newfloat = $newfloat + $calculate;

$arraynumber = $arraynumber + 1;

}while ($newfloat < $curveLenght);

curve $array;

}else{

print("The number of vertices must be larger than the number one.\n");

}

}

any help will be appreciated. Thanks :)

global proc CreateCurve(int $numVerts, float $curveLenght)

{

int $numVerts;

string $curve;

float $calculate;

float $curveLenght;

string $array[];

float $calculate = $curveLenght / $numVerts;

if ($numVerts < 1 || $numVerts = 1)

{

int $arraynumber;

int $arraynumber = 1;

float $newfloat;

do {

$array[$arraynumber] = "-p 0 0" + $calculate + " ";

$newfloat = $newfloat + $calculate;

$arraynumber = $arraynumber + 1;

}while ($newfloat < $curveLenght);

curve $array;

}else{

print("The number of vertices must be larger than the number one.\n");

}

}

any help will be appreciated. Thanks :)