0

I get a syntax error every time I use the following mel script

string $namespace = "old_house";
If ('namespace -exists $namespace'){print "yes";}

Can anyone tell me what I'm doing wrong?

zapping
  • 4,118
  • 6
  • 38
  • 56
Milesklc
  • 3
  • 4

1 Answers1

0

Just replace the ' with a tilde (`) in side the if condition. Statement or expression wrapped within a tilde tells the interpretter that that chunk is a mel command that needs to be executed, and the result is piped out. Also if should start with a small i.

kartikg3
  • 2,590
  • 1
  • 16
  • 23