Well first off, I wouldn't ever use GM's built in mplay functions. Look into using 39dll or at least SOCdll.
As for the error, the only thing I could say is that the server isn't actively listening. I don't know the mplay functions that well, and I'm at school so I can't check, so maybe it is. It seems to maybe need an mplay_listen(?) type function of sorts, so it can connect.