a question..
did you include the acknex header file?

2nd)
Are you allowed to use the script of the original author?
3rd)
Did you include the originals variables, structs, vectors..etc? Cause custom created ressources are not automatically copied with the script

4th)
why did you vopy a code out of an existing game? That's a bit pathetic.. And then a wdl script.. i think you are using lite-c..
i think you need to learn a bit more about scripting than just copy&paste things!