Hmm. "File ended while scanning use of ...." is basically the result of a parsing error, there is an error in the (final) USFM or how it's being read, where there is something expecting an end-marker and it doesn't get it.
That doesn't help you very much, so I did some more digging: \@nxxt is a used as part of a macro that grabs the parameter for an identifier like \h or \id, where *any* other marker ends the parameter. (\h and \id cannot be followed by general USFM, only by unmarked text).
My guess is that your final SFM is ending with \h or \id, OR there is a marker within \h or \id which is expecting a parameter.
e.g. \h something \c <END OF FILE>
-----------
Over-detailed explanation:
In processing \h, it will read each letter of "something ", adding them to the stored parameter in turn until it reads something which is not a simple letter. That non-letter is assigned to \@nxxt (the macro defined by \c is certainly not a simple letter). It would then do whatever's necessary with the parameter "something ", and then execute the remembered macro \@nxxt.
\c (and hence \@nxxt) expects to read a space-terminated chapter number (new lines count) if the file ends before that chapter number and end-marking-space is found, then you'll trigger the error.
------------
Similarly, if the first thing after the \h / \id is not a paragraph style but instead a \k, and there is no \k* to mark the end of the keyword, you'll end up with the same error. There are a few even stranger situations, but I hope this is enough of pointer.
You need to have a careful read of the final SFM (see the view/edit tab) for the glossary, compare it with the original glossary, and discover where the problem lies.