Error when do categorical

It always shows that no matches for : available argument signatures fir categorical: real return type required for probability function.

data {
  int<lower=0> N;
  int<lower=0> N1;
  int<lower=0> P;
  int<lower=0> p1;
  int<lower=0> p2;
  int<lower=0> p3;
  int<lower=0> cat1;
  real Y[N];
  int X[N]; 
  matrix[N,P] M1;
  int M2[N,P]; 
  int  Mc[N,P];
  int  contm[p1];
  int  binm[p2];
  vector[p3] cat3;
parameters {
  real alpha0[p1];
  real alpha1[p1];
  real alpha0_b[p2];
  real alpha1_b[p2];
  matrix[p3,cat2[p3]] alpha0_c;
  matrix[cat1,cat2[p3]] alpha1_c;
  real beta0;
  vector[P] beta;
  real c;
  real<lower=0> sigma1[p1];
  real<lower=0> sigma2;


model {
   matrix[N,p1] mu_M1;
   matrix[N,p2] mu_M1_b;
   real mu_Mc[N,p3,N1];
   matrix[N,cat1] sum_Mc;
   vector[N] mu_Y;
   real mu_Mc00[N,cat1,cat2[p3]];
   for (i in 1:N){
    mu_Y[i]= beta0 + c*X[i] + dot_product(beta,M1[i,]);
    Y[i] ~ normal(mu_Y[i],sigma2);
       for (j in 1:p1){
    M1[i,contm[j]] ~ normal(mu_M1[i,j],sigma1[j]);
       for (k in 1:p2){
     mu_M1_b[i,k] = alpha0_b[k]+alpha1_b[k]*X[i];
     for (j in 1:cat1){
     mu_Mc[i,j,1] =1; 
     for (k in 2:cat2[j]){
     mu_Mc[i,j,k] =exp(alpha0_c[j,k-1]+alpha1_c[j,k-1]*X[i]);
      for (l in 1:cat2[j])
      {mu_Mc00[i,j,l] =mu_Mc[i,j,l]/sum_Mc[i,j];}


Please don’t open multiple threads for the same topic