Oh god, I remember that problem. The pokemon essentials ds compiler, ain't exactly that great. just copy the script from the original pokemon essentials compiler and paste over the ds compiler script,
then after words, compile with your editor, and it should work fine.
Thats what i did and...