There is nothing wrong with the syntax you wrote as I am able to make it work here. However, there are a couple of things to try:
Ensure that the file is located in the current MathScript search path. In the MathScript window, type "path" and "pwd" (without quotes). Is the directory in which you saved your function listed in the output of one of those two commands?
Is the filename you gave to your function the same as the function
name? LabVIEW MathScript requires that the two be the same. In your
case, is the file saved as deg2rad.m?
Grant M. Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
By the way, if you wish to change the default search path for MathScript, go to File >> MathScript Preferences in the MathScript Window. If you only wish to change it for one time, you can use the path (or addpath) command. This will affect both the MathScript Window and the MathScript Node.
Grant M. Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments