Triggers. Creating and attach to objects

Please format your code

> I have an error

Amazing! Thats a great start, and it will explain exactly what is wrong. It is very important to read the error and try to understand it. At the very least when asking for help, post your error message.