Answers
Hi!
Well, I wrote MEL Scripting for Maya Animators. Glad you're enjoying it
just kidding.
OK, so here are a few things:
*** First off, leave the parentheses ON when you add 98 and 80 to $bOffsetH2 and $bOffsetW. Otherwise, Maya will try to interpret the + in the addition as a separate argument to formLayout and go nuts.
*** Second, the purpose of the line
window -title "Skeleton Controls" -widthHeight 450 450 SCcontrols;
is to make a window object called SCcontrols. At the end of your script, though, when you call showWindow, you say
showWindow SkeletonControls;
So you're naming the window object SCcontrols when you make it and SkeletonControls when you try to show it. This is why it doesn't do anything -- the latter command should be
showWindow SCcontrols;
*** Finally, as to your original question, all of this code makes a window object with a particular name. Maya will complain if you try to make two window objects with the same name. Probably you ran the script more than once and the second time you started getting the error.
The solution is on page 468 of the book: "If you are getting errors and need to delete the window, type in deleteUI MBcontrols"
So for your script, if you want to run it a second time, you'll need to type
deleteUI SCcontrols;
or
deleteUI SkeletonControls
depending on what you actually choose to name your window.
Hope that helps!!
-- Mark