Troubleshooting MEL

The error
Possible solutions
Cannot convert data of type float[] to type float. Declare your variable explicitly before making use of it. // float $variable;
Invalid redeclaration of variable "$float" as a different type. Use a different variable to catch the data from the offending variable. // $single = $array[0];
$undeclared is an undeclared variable. // even though the variable is used in a previous loop // Declare the variable outside of any loop.
Error: Syntax error Common errors include mismatched or open parenthesis and statements without ;
Error: Line 4.1: Syntax error // where Line 4.1 is the final } in your procedure Make sure all of your { have matching } within the procedure
Error: Unterminated string. Usually a print statement has one too many or too few double quotes in it. If you want to print the symbol " it must follow a \ in your print statement.
Illegal operation "+" on data of type string[]. Mathematical functions must be performed on each member of an array separately.
Cannot find procedure "variableNameHere". Make sure you put a $ in front of all variables
Cannot find procedure "yourProcedureNameHere". Be sure to source all necessary procedures or keep them in a directory where Maya will read them as the software is loaded.
Invalid call to "error". Check number and types of arguments expected by the procedure. Some functions require a number of input variables. See Maya's MEL command reference for details on specific commands.