Problem with saving a duplicate

Problem with saving a duplicate

Anonymous
Not applicable
620 Views
3 Replies
Message 1 of 4

Problem with saving a duplicate

Anonymous
Not applicable

I never had this problem before, but now I don't know how to fix it.

 

When I duplicate something in mel it works fine.

 

But as soon as I want to save the duplicate DAGpath in a variable it tells me that it can't convert an array to a string.

 

If I have an object selected.

 

And I just type:

duplicate;

 

 

Then it works.

 

But if I do this:

 

$saveVar=`duplicate`;

 

 

Then it gives me an error, I don't understand?

0 Likes
Accepted solutions (1)
621 Views
3 Replies
Replies (3)
Message 2 of 4

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

You need to declare the variable (as array) first.

 

Try this instead:

string $saveVar[];
$saveVar=`duplicate`;

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thank you, I tried something similar but I was off a little.

0 Likes
Message 4 of 4

Anonymous
Not applicable

it works both ways now, after I just restarted, weird.

0 Likes