PDA

View Full Version : can anyone tell me why maya doesnt like this


jilkka
01-28-2011, 05:13 AM
can anyone tell me why maya doesnt like this:

string $maxVn = `print (float($maxV2) / 2)`;

where $maxV2 is equal to 3

pixelranger
01-28-2011, 02:45 PM
string $maxVn = float($maxV2) / 2;

The print command just prints stuff. It doesn't actually "return" anything, in a assign->return kind of way. So it will print out the answer (1.5) , but it won't give you "//Result: 1.5".
My above code will give you a "Result".

jilkka
01-29-2011, 01:17 AM
string $maxVn = float($maxV2) / 2;

The print command just prints stuff. It doesn't actually "return" anything, in a assign->return kind of way. So it will print out the answer (1.5) , but it won't give you "//Result: 1.5".
My above code will give you a "Result".


You just saved my rear end, thanks much!
I will include your username in my mel script.

CGTalk Moderation
01-29-2011, 01:17 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.