I've been teaching myself MEL scripting but I'm sort of stuck on a particular syntax. I've searched all over for my specific problem but I'm not sure which key words I should be searching for and can't find anything, so thank you in advance to anyone who can help.
I have a button setup with a command within parentheses, however this seems to only be good for a single command. The portion of code in bold is what I'm having issues with. I need to keep this parenthetical format but also have it work with two or more commands. An example would be to have the command delete $materials[$i] as well as print "Deleted " + $material [$i];
button -label "D" -bgc .5 0 0 -command [B]( "delete " + $materials[$i] )[/B];
Normally I would just put the whole command inside quotations, however doing so seems to break the scope of my variables which kicks out an error about how $materials and/or $i are undefined.