I can make you a quick list of your errors:
1-You modified DCs sample without even knowing what were you doing.
2-You used a useless long list of ifs, but you didn't use a single elseif.
3-You made a table with all the functions and shit. Then you tried to make another table with the same name, but you failed because you just copied DCs sample.