Initialization is different from assignment
 
 
 

This distinction is really only important for global data.

For non-global data, initialization works exactly the same as assignment because it will get executed every time the script or procedure containing it gets executed.

Global initialization occurs only once and takes places before any execution occurs. For this reason, the initialized value must be a compile-time constant.

Error: line <<XX>>: Cannot find procedure “<<proc name>>”?

The error message

//// Error: line 1: Cannot find procedure "fred". //

usually means that MEL cannot locate the procedure that the script or command you are executing requires. In other words, either the procedure has not been highlighted and executed in the Script Editor, the name was misspelled, or it doesn’t exist in any of the scripts in your script path.

It can also mean that there has not been enough information supplied to the script or command in order for it to work properly.

The first thing to do is to make sure that the procedure exists either on disk in your ~/maya/scripts directory (or script path). Check to make sure the spelling of the procedure name matches the spelling that you are executing.

If you have confirmed that it exists in a script or has been sourced into memory via the Script Editor. The next thing to check is the argument list of the procedure that is reporting the problem.