General error locator polynomials for nth-root codes