Bootstrapping code help needed in r??

Hello friends. So I am ready to jump off a building because I cannot figure out this code for my LIFE. Everytime I run it, I get the standard error of 0 (bias=0 too) so obviously I'm doing something wrong because it's using the same sample when I want 1000 iterations.

I want the AIC of the model for all these samples. I've created a data frame and named it "d."

Here is my code:

bootaic<-function(d, idx){
fit<-coxph(Surv(time,infection) ~ X48FL + X55FL, method="efron", data=d)


WHAT IS WRONG. I appreciate any and all help, I am a novice to bootstrapping and I suck at coding.