Trends not compatible?

Hi,
I'm trying to run this model, but it says my trends are not compatible...
I have checked and double checked the growth trends, and the trend declarations seem correct. I would be very grateful if someone could please take a look at the code and trying to point out the error.
Thanks in advance!
I'm trying to run this model, but it says my trends are not compatible...
ERROR: trends not compatible with balanced growth path; the second-order cross partial of equation 14 w.r.t. trend variable X and endogenous variable PStar is not null.
I have checked and double checked the growth trends, and the trend declarations seem correct. I would be very grateful if someone could please take a look at the code and trying to point out the error.
Thanks in advance!