Fit with new function

Hello everyone, thank you in advanced for your help...

I cannot create a simple new function for fitting: I receive the error that the function cannot be compiled (I have attached a screenshpot). 

Can you suggest me how to fix it?

Thank you. G

Fit compiling error

As the message indicates, there is some erroneous code somewhere in your Igor session which cannot get compiled. Igor complies all code together including fit functions (unless the code is in special modules), but if there is sone error anywhere the compilation of everything fails. So, in short, some garbled code (maybe in the procedure window => ctrl + m) is causing this. You have to close the fit dialog and first solve this problem before being able to write and use fit functions again. Surprisingly, there seems to be no alert message telling you where the error was occurred, but maybe you have clicked away such message already.

It would be nice if that message told you where to look for the failed compile, wouldn't it? I can't recall any more why it doesn't.

You will have to close the dialog, and the Curve Fit dialog, and try compiling. Possibly use Macros->Compile to start compiling. You should get an error alert from that that tells you more about what the trouble is.

This is one of the troubles with that dialog- there isn't an easy way to get out of trouble like this.