Errors after following tutorial

You can attach the material and function here as text files. I will take a look if you like.

In the material editor just select all, copy and paste in a text file.