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 unlikely).
fn myFunc n attribute value =
cmd = ( "$" + n.name + "." + attribute + " = " + value as string )
myFunc $ "height" 50
Edit: Beaten to the punch by cw! But mine has a tested working code example ;)
Edit2: Actually this is really dodgy since I'm using $<name> to set the property, which is bad since you might have multiple objects in the scene with the same name.
There's probably a better way to get the actual node in there, I'm just too lazy to look it up at the moment