Error in new_CppObject_xp(fields$.module, fields$.pointer, …) :
Exception: variable does not exist; processing stage=data initialization; variable name=N; base type=int (in ‘modelc854a6a58ef_bayesianweightedquantile’ at line 2)

here is my stan file:

1 data {
2 int N;
3 real Y[N];
4 real X1[N];
5 real wt[N];
6 real tau;
7 }
8 parameters {
9 real a;
10 real b;
11 }
12 model {
13 int h[N];
14 real u[N];
15 real lambda[N];
16 a~normal(0,10);
17 b~normal(0,10);
18 for (i in 1:N){
19 h[i]=0;
20 u[i]=(Y[i]-a-b*X1[i]);
21 lambda[i]=wt[i]*(log(tau*(1-tau))+(fabs(u[i])+(2*tau-1)*u[i])/2)+10000;
22 h[i]~poisson(lambda[i]);
23 }
24 }