Simply put, if the call of the identifier was from a script file, it should always report the line number, if it's not, you need to report it as a bug.
But it seems that you're not sure it's coming from a script file. There are various places in mIRC (in the options) where you can call identifiers, where that shouldn't return a line number, so check for that.

Looking for a good help channel about mIRC? Check #mircscripting @