Are you sure you do not have 2 of the same plugins running? Maybe a test version and another version? Check your plugins.ini to be sure. If you want faster help, post code that I can paste in an IDE and compile without having to create a list of variables and things.
In the past I've spent time wondering why something wasn't working only to find out I either didn't enable the plugin in plugins.ini, or I had something else running that counteracted it.