You need to use the execute command to assemble a string to evaluate. You will also need to pass "height" as a string - currently you're trying to pass it as a variable, therefore it will end up passing undefined at the moment (unless you defined height as a string value of "height" earlier in the code, which seems…
Ok MoP, I see your code example and raise you another (just for fun, like..) fn myFunc n attribute value = ( --cmd = ( "$" + n.name + "." + attribute + " = " + value as string ) --execute cmd -- proper way! ;) objs = n as array for obj in objs do ( if hasproperty obj attribute then ( setProperty obj attribute value )…
haiddasalami: You have to use "execute" because you're assembling a command as a string. You have to pass the variables to the function as strings because you can't just access the node properties for any generic attribute (since height on its own is just a variable name, not a property of an object).