I build the script component and there was no error or warnings.
Then closed it and clicked ok in the script component. Still i get this error.
Are you saying that you get the error on clicking OK in design mode? So the error appears without even executing the package?
It's starting to sound like you may have a problematic installation. Can you try the same thing on another machine?
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.