Fix typo in format() call

The second format variable was being passed to error().