A: we cannot possible offer any decent advise, so I'll go with indecent -- did you try using $remove(%somevar,$chr(44)).

B: you did a good thing providing the line number where the error occurs, but in line 19 of your code pasted here there is no aline command. It would be nice if next time you would paste the line separately or indicate where it is.
That said, I wil assume the only aline command in your code is the one causing the error. In which case the solution is simple: not everytime the sockread event triggers, does your variable %weather get a value. In that case, your line aline 8 @Weather %weather is interpreted by mIRC as aline 8 @Weather. mIRC will then complain that it is to write something to the window without knowing what, hence the error. The solution is simple:
Code:
if (%weather) aline 8 @Weather %weather