But if I try to use rpairs instead, it complains about an "attempt to compare two nil values". I don't actually have the code up, but, if I recall correctly, my rpairs is similar to the 'spairs' code you linked, but the sorting function works differently. In the code you linked, the sorti...