Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 03-18-2004, 03:50 PM   #1 (permalink)
 
Join Date: Jan 2004
Age: 22
Posts: 92
Default OK, i need mad help here, READ PLZ!

When i start my server.exe, it says Compiling C# scripts...failed (1 error)
Error: ServerList.cs
One or more scripts failed to compile or no script files were found.

This happened after i edited the ServerList so clients could connect to me. The script lines are as follows:

using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public const string Address = 192.168.0.100,2593;

public const string ServerName = "Mists of Destruction";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{
try
{
outValue = IPAddress.Parse( addr );
return true;
}
catch
{
try
{
IPHostEntry iphe = Dns.Resolve( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}
}

outValue = IPAddress.None;
return false;
}

private static bool IsLocalMachine( NetState state )
{
Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )
return true;

bool contains = false;
IPHostEntry iphe = Dns.Resolve( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList[i] );

return contains;
}
}
}



The computer i am on now is routed to my computer in my room which is on a cable modem. The IP i have in the context string right now is the same IP i get when i started my server.exe earlier, it said Ip = blabla. Ive tried to put the router ip in and everything, i still get errors. If i put in IP = Null in the script, would that make it so the shard IP would be automatically detected and clients from other PCs can still connect to me?
xxtalonxx is offline   Reply With Quote
Old 03-18-2004, 04:55 PM   #2 (permalink)
Tru
Forum Expert
 
Tru's Avatar
 
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
Default

"12.34.56.78"
use quotes around you ip
Tru is offline   Reply With Quote
Old 03-18-2004, 05:06 PM   #3 (permalink)
Forum Expert
 
stormwolff's Avatar
 
Join Date: Nov 2003
Location: The Internet
Age: 28
Posts: 3,510
Default

You dont need so many topics on the same thing.

Metalarmordyetub
stormwolff is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5