Hi this is the first time that I've encounter this error in generating script for my database, what do you think causes this error? Thanks. Please see image.
You are getting the error as you are trying to script out
OBJECT that is encrypted. You should read the error carefully as it is self descriptive :
There are ways that you can use as described in my answer - How to view an encrypted view or stored procedure ? and here - Martin's answer.