It is not obvious from the site you linked to exactly which code you copied. Can you please be more exact and post a link to where it can be downloaded from ?
To be honest, the code you posted has multiple problems and is probably not worth trying to fix. For instance, it depends on some libraries but none are #included by the code