Problem adding script to GUI Texture

I have a code with me which suppose to be a Button Press code , but when i try to drag it into the GUI Texture it said " The scripts had not finished compiling" i tried several time but couldn’t figured out why, Please Help.

Can you post the script here?

In order to use a script unity needs to translate it to machine code. It says it has not finished doing so.
Note the small icon in the bottom right of the unity window. While it is active it means scripts are still being processed.
If compiling was done and you did not get compilation error the script should be available.