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 04-25-2004, 02:45 PM   #1 (permalink)
 
Join Date: Apr 2004
Age: 28
Posts: 10
Default script error on RunOU.exe

i have this error

Scripts: Compiling C# scripts...failed (3 errors, 0 warnings)
- Error: Scripts\Misc\ServerList.cs: CS1518: (line 89, column 17) Expected clas
s, delegate, enum, interface, or struct
- Error: Scripts\Misc\ServerList.cs: CS1003: (line 104, column 59) Syntax error
, ']' expected
- Error: Scripts\Misc\ServerList.cs: CS1022: (line 106, column 6) Type or names
pace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.



and here is my server list:



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

namespace Server.Misc
{
public class ServerList
{
public static void Initialize()
{
Listener.Port = 2593;

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

private static bool OnServerLocalNetwork( Socket s )
{
// Check for Loopback also
IPEndPoint LEndPoint = (IPEndPoint)s.LocalEndPoint;
IPEndPoint REndPoint = (IPEndPoint)s.RemoteEndPoint;

string LocalIP = LEndPoint.Address.ToString();
string RemoteIP = REndPoint.Address.ToString();

int lastdot = RemoteIP.LastIndexOf('.');

if ( !(LocalIP.Substring(0,lastdot) == RemoteIP.Substring(0,lastdot)) )
return false;
else
return true;

// ((IPEndPoint)e.State.Socket.RemoteEndPoint).Addres s.ToString()
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
bool Router = true;
string ServerName = "disorder";
string Domain = "disorder.3utilities.com";

if (!Router) {
IPHostEntry thisHost = Dns.Resolve( Dns.GetHostName() );
IPAddress[] addressList = thisHost.AddressList;

if ( addressList.Length > 0 )
{
e.AddServer( ServerName, new IPEndPoint( addressList[addressList.Length - 1], Listener.Port ) );
}
else
{
e.Rejected = true;
}
}
else if (OnServerLocalNetwork(e.State.Socket))
{ // Check for Loopback client - no, check for local network.
IPHostEntry thisHost = Dns.Resolve( Dns.GetHostName() );
IPAddress[] addressList = thisHost.AddressList;

if (addressList.Length > 0)
{
e.AddServer( ServerName, new IPEndPoint( addressList[addressList.Length - 1], Listener.Port ) );
}
else
{
e.Rejected = true;
}
}
else
{ // If behind a router, and not on local network:
IPHostEntry thisHost = Dns.Resolve(Domain);
IPAddress[] addressList = thisHost.AddressList;

if (addressList.Length > 0)
{
e.AddServer( ServerName, new IPEndPoint( addressList[addressList.Length - 1], Listener.Port ) );
}
else
{
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;
}
}
}




PLZ HELP ME!!!! lol thanks
krispon is offline   Reply With Quote
Old 04-25-2004, 02:46 PM   #2 (permalink)
 
Join Date: Apr 2004
Age: 28
Posts: 10
Default

ohh yeah if u dont know how to fix this can you just send me the whole
serverlist file?
krispon is offline   Reply With Quote
Old 04-25-2004, 02:51 PM   #3 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by krispon
ohh yeah if u dont know how to fix this can you just send me the whole
serverlist file?
No

We will tell you what to fix, but your going to do it. I will look at it in about an hour, I don't feel like helping you after reading your reply.
Phantom is offline   Reply With Quote
Old 04-25-2004, 02:53 PM   #4 (permalink)
 
Join Date: Apr 2004
Age: 28
Posts: 10
Default

was i rude?? if so sry. and ty for helping me
krispon is offline   Reply With Quote
Old 04-25-2004, 03:02 PM   #5 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by krispon
was i rude?? if so sry. and ty for helping me
Yes

You told us how we should help you basicly, and well thats not a good thing.
Phantom is offline   Reply With Quote
Old 04-25-2004, 03:04 PM   #6 (permalink)
 
Join Date: Feb 2004
Location: Canada eh
Posts: 413
Default

Too many '}' in EventSink_ServerList

The error message is correct and distinct, the compiler did not know what to do at
(line 89, column 17). Start looking there and work your way back from there.
-----------------------------------------------------------------------------------------------------------------------------------
awdball · NON-beligerent Forum Member · · · · ;^) · · · · RUNUO-FAQ · · [CODE] Post CODE inside tags [/CODE]
The team for moderation on RUNUO Forums · · · · HelpSomeone
(old school c coder learning and luvin c#) · · · · · · · Great C# Tutorial
__________________
awdball
awdball is offline   Reply With Quote
Old 04-25-2004, 03:04 PM   #7 (permalink)
 
Join Date: Apr 2004
Age: 28
Posts: 10
Default

ohh sry bout that wasnt tring to be mean
krispon is offline   Reply With Quote
Old 04-25-2004, 03:13 PM   #8 (permalink)
 
Join Date: Apr 2004
Age: 28
Posts: 10
Default

sry awdball but im a little lost how do i know what } to get rid of??
krispon is offline   Reply With Quote
Old 04-25-2004, 03:29 PM   #9 (permalink)
 
Join Date: Feb 2004
Location: Canada eh
Posts: 413
Default

Quote:
Originally Posted by krispon
sry awdball but im a little lost how do i know what } to get rid of??
Best thing you could do is count them, count all the open braces and subtract all the closing ones. The end result is you want all your methods inside the braces that delimit the class.

Do a C# tutorial or two also. This ia a programming language and not very forgiving.
-----------------------------------------------------------------------------------------------------------------------------------
awdball · NON-beligerent Forum Member · · · · ;^) · · · · RUNUO-FAQ · · [CODE] Post CODE inside tags [/CODE]
The team for moderation on RUNUO Forums · · · · HelpSomeone
(old school c coder learning and luvin c#) · · · · · · · Great C# Tutorial
__________________
awdball
awdball 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