Yes you are right, but my point was that "something wrong" happened when I declared the new ActiveXObject, stoping the function so that it didn't reach the line to return something.
I've tried that return ws.LocalIP in the past and also didn't work (and obviously I just retried it to make sure), making me believe that "MSWinsock.Winsock.1" isn't a valid ActiveXObject, at least in my pc