i purchased a limited edition copy of halo 4 and when i attempted to put in the codes it said they have already been used but this was a brand new copy of the game
You should probably go and report that to the person/store where you bought the game.
If it was a new copy, that’s an issue you need to take up with the retailer. If it was used, codes are NEVER guaranteed to work in used games.