From WikiChip
Difference between revisions of "mirc/identifiers/$sockerr"
< mirc‎ | identifiers

m
Line 1: Line 1:
{{mirc title|$sockerr Identifier}}'''$sockerr''' return the socker error number if an error occured.
+
{{mirc title|$sockerr identifier}}'''$sockerr''' returns the sock error number if an error occurred.
  
 
For example, in the {{mIRC|on events/on sockopen|on sockopen}} event, if the connection is not established, $sockerr is set
 
For example, in the {{mIRC|on events/on sockopen|on sockopen}} event, if the connection is not established, $sockerr is set
Line 7: Line 7:
 
* '''3''' - Failure establishing socket connection: $sock($sockname).wsmsg will contain a more specific error message.
 
* '''3''' - Failure establishing socket connection: $sock($sockname).wsmsg will contain a more specific error message.
 
* '''4''' - Error resolving given hostname.
 
* '''4''' - Error resolving given hostname.
 
  
  
Line 13: Line 12:
 
<pre>$sockerr</pre>
 
<pre>$sockerr</pre>
  
== Paramters ==
+
== Parameters ==
 
 
 
None
 
None
  
 
== Properties ==
 
== Properties ==
 
 
None
 
None
  
 
== Example ==
 
== Example ==
 
<source lang="mIRC">on *:sockread:name:{
 
<source lang="mIRC">on *:sockread:name:{
if ($sockerr) return
+
  if ($sockerr) return
 
...
 
...
 
}</source>
 
}</source>
Line 31: Line 28:
  
 
== See Also ==
 
== See Also ==
{{mIRC|$sock}}
+
* {{mIRC|$sock}}
{{mIRC|$sockname}}
+
* {{mIRC|$sockname}}
{{mIRC|$sockbr}}
+
* {{mIRC|$sockbr}}
[[Category:MIRC identifiers]]
+
{{mIRC identifier list}}
 +
[[Category:mIRC identifiers|sockerr]]

Revision as of 14:49, 22 September 2017

$sockerr returns the sock error number if an error occurred.

For example, in the on sockopen event, if the connection is not established, $sockerr is set

Inside the on sockopen event:

  • 0 - Success.
  • 3 - Failure establishing socket connection: $sock($sockname).wsmsg will contain a more specific error message.
  • 4 - Error resolving given hostname.


Synopsis

$sockerr

Parameters

None

Properties

None

Example

on *:sockread:name:{
  if ($sockerr) return
...
}

Compatibility

Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also

[Expand]
v · d · e mIRC identifier list