Thread: mel script
View Single Post
# 1 09-12-2006 , 12:12 PM
Registered User
Join Date: Dec 2006
Posts: 3

mel script

im doing a project on animating the Towers Of Hanoi using a recursive algorithm. It all works fine but im adding a couple of features and have come across a problem. i need an assembled variable name to print out its value. not the string itself

i.e

int $srcCount = 2 ;
string $dst = "src"
print("$" + $dst + "Count")

this prints out "$srcCount". which means it is assembling the variable correctly, but instead of printing its value, its printing the word.

eg if i were to simply type "print($srcCount)" it would print out its value of 2 which it was initialised at.

does anyone know of the way of making maya output the assembled variable names value. so the previous three lines of code would print "2"?

thanks