Here is what I did:
I enabled Species Transport. I choose "mixture-template" in the Mixture Material drop-down list. In the Materials panel, I added arbitrary fluid materials in that mixture up to 18. Finally, I hooked the UDF in the boundaries panel, adding energy source in the fluid zone. I did few iterations without bug. Do you use it that way?

If you have less then 18 species defined in your mixture there is a bug here in your code:
for(i=0;i<18;i++)
{
sum=sum+C_YI(c,t,i)/MW[i];
}

You can easily see how many species you have:
Define -> Models -> Species -> Transport & Reaction
Just look at the right of "Number of Volumetric Species"