Indeed, this is exactly what happened. I had a statement
set to elem #k #tosqrs;
and through a bug elsewhere k had gotten the value -1. So this must have set to to the string value "#to". This was passed through many other variables, finally ending up as the destination operand in a move command. This apparently calls compose_move internally, which produced the error message.
Ultimately I could trace the source of the error to the variable that held the range of the leg of a move not being declared as local in a my statement, so that the recursive call that happens for two-leg moves (such as those of the Sissa) spoiled it for the earlier instance. Turned out I had declared the variable in the my statement as 'range', while the code in the routine consistently used 'rng' instead.
I think it should work now that I changed the declaration to rng. In my test position it no longer complains.
Indeed, this is exactly what happened. I had a statement
and through a bug elsewhere k had gotten the value -1. So this must have set to to the string value "#to". This was passed through many other variables, finally ending up as the destination operand in a move command. This apparently calls compose_move internally, which produced the error message.
Ultimately I could trace the source of the error to the variable that held the range of the leg of a move not being declared as local in a my statement, so that the recursive call that happens for two-leg moves (such as those of the Sissa) spoiled it for the earlier instance. Turned out I had declared the variable in the my statement as 'range', while the code in the routine consistently used 'rng' instead.
I think it should work now that I changed the declaration to rng. In my test position it no longer complains.