What does this error means?

your prime vector is not correct, print it and you will know why. correct it and then try. take this for reference.