Flipped a couple of commands to test it, and they work fine.
Thanks both for your help.
I shall make a CCF of the discrete codes and add it to the sites db, in case anyone else has the same problems..
Thanks again!