Sorry but why this script didn't working?

Before we thrash around too much more guessing, let me offer this to OP:

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand compiler and other errors and even fix them yourself: