I'm not familiar with two phase flow, but your UDF looks good and I have compiled and linked without any error, with liquid source at phase1 and vapor source for phase2.
but I get an error message, it is not like yours.
if you have a simple case may be you can send it to me, I think that I had missed some things.
I think there is no need to use udf to model evaporation and condensation instead you can use the evaporation/condensation module in fluent. i have used this udf recently and there is no problem with it.