Help with own defined fitting function/ parameters

im trying to fit this macro with my own fitting function,
but i keep getting an error claiming that my fitf/fitf has 0 parameters instead of 1

Double_t fitf(Double_t *x, Double_t *par)

Double_t gg = 0;
if (par[2] != 0) gg = (x[0] - par[1])/par[2];
if (par[5] !=0) ge =(x[0] - par[4])/par[5];

Double_t gtr = par[0]*TMath::Exp(-0.5*gg*gg);
Double_t gtrr = par[3]*TMath::Exp(-0.5*ge*ge);

return gtr;


void delete1()


TF1 *fitf = new TF1(“fitf”,fitf,4800,5966);

TFile *left=TFile::Open("data/leftgaus.root");
TFile *right = TFile::Open("data/rightgaus.root");

TTree* rhist =(TTree*)right->Get("T_mv");
TTree* lhist= (TTree*)left->Get("T_mv");

TH1D* hist = new TH1D("hist", "ssss",100, 4800,5966);

rhist ->Draw("mass>>hist");
lhist ->Draw("mass>>+hist");
hist-> Draw();