<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://www.fenixdocs.com/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Category:Errorcodes - Revision history</title>
		<link>http://www.fenixdocs.com/index.php?title=Category:Errorcodes&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.1</generator>
		<lastBuildDate>Sat, 02 May 2026 15:56:47 GMT</lastBuildDate>
		<item>
			<title>Sandman at 23:23, 15 April 2007</title>
			<link>http://www.fenixdocs.com/index.php?title=Category:Errorcodes&amp;diff=1620&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Errorcodes are [[constant]]s that get generated by a [[function]] or another piece of code, when there occurs a malfunction.&lt;br /&gt;
For example when you try the following code with the [[Network_DLL|Network.DLL]] function [[NET_Connect]]():&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( (netid = NET_Connect(&amp;quot;some-not-existing-server&amp;quot;,1234)) &amp;lt; 0 )&lt;br /&gt;
    //error&lt;br /&gt;
else&lt;br /&gt;
    //success&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The code [[NET Errorcodes|NET_ERROR_CONNECTING]] is returned, which in fact is the value -20, which is less than 0, so we go into the //error section. Here we can for example output the error:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
say(&amp;quot;Error: &amp;quot; + NET_GetError(netid));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or perform an action based on the type of error:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch(netid)&lt;br /&gt;
    case NET_ERROR_CONNECTING:&lt;br /&gt;
        say(&amp;quot;Could not connect to the specified server.&amp;quot;);&lt;br /&gt;
    end&lt;br /&gt;
    case NET_ERROR_TOOMANYCONNS:&lt;br /&gt;
        say(&amp;quot;There are too many connections open at this point.&amp;quot;);&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that errorcodes do not necessarily have to be negative numbers; Network.DLL does this so the check of an error is just the check if the returned value is negative.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a list of errorcodes generated by [[:Category:dll|DLL's]] and others.&lt;/div&gt;</description>
			<pubDate>Sun, 15 Apr 2007 23:23:46 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://www.fenixdocs.com/index.php/Category_talk:Errorcodes</comments>		</item>
	</channel>
</rss>