Just for my understanding: Was this a consequence of calling askpromote in the Post-Game code rather than the Post-Move code? Would the code you posted from the fairy include be immune to this, or would it have suffered from the same problem?
As far as I know, the code from the fairychess include file was immune to this, as it has never had this problem. It probably had something to do with placing your code in the Post-Game section, but I did not analyze it enough to determine what the exact problem was, for I did not try to debug your code.
Please note that the problem with resign still has not been solved. Resigning still draws an error message. (In Play mode; I did not test it in a two-player game.)
The resign command has no use in Play mode, and its behavior there is undefined. If you're not testing it in a two-player game, you're not testing it.
As far as I know, the code from the fairychess include file was immune to this, as it has never had this problem. It probably had something to do with placing your code in the Post-Game section, but I did not analyze it enough to determine what the exact problem was, for I did not try to debug your code.
The resign command has no use in Play mode, and its behavior there is undefined. If you're not testing it in a two-player game, you're not testing it.