I had made a previous post about this and thought I had it fixed.
Socket question
I added it to the full script yesterday and now im having problems again.
Code:
alias servping { sockudp -k servping 12.96.167.180 27015  $+ ping | set %servping $ticks }
on *:udpread:servping:{
  sockclose servping
  echo -a $calc($ticks - %servping)
  unset %servping
}
on *:SOCKWRITE:servping: {
  var %servpingerror = $right($left($sock(servping).wsmsg,2),1)
  if (%servpingerror >= 0) && (%servpingerror <= 5) { echo -a Error:  %servpingerror }
}
  

That did work great and I had no problems, but now its returning an error of 0 every time I ping a server. So I dropped it back into plain mirc that has no other scripts and I again got errors. I tried it in the mirc version that I wrote it in and got errors. It returns errors correctly on servers that are not online, but it also returns them for servers which are online and its bugging me. Does anyone have any ideas?