Jump to content

ArgumentOutOfRangeException when calling GameStat.ServerPlugin.GetGameServerStatus C#


XeroS1x

Recommended Posts

Hi Guys,

 

I have a piece of code in C# that enables me to get the current status of a particular game server (see below).

 

TCAdmin.Plugins.GameStats.ServerPlugin plugin = new ServerPlugin();
string response = (string)plugin.Execute(new Object[] { GetGameServerStatus", IP, Port, gameID, service });

 

The 'response' variable in the script above is usualy an XML as you guys know. For some game servers I get the XML response, and for others I get a blank response (even though the server is online and running, checked on TCAdmin interface to confirm this)

 

For the requests to GetGameServerStatus that return the black response, this error gets logged on the TCAdmin Monitor Error Logs:

 

2011/12/29 04:37:21 PM : GameStat.ServerPlugin.GetGameServerStatus: Specified argument was out of the range of valid values.

Parameter name: type

 

Any idea what this 'type' parameter is? Also, is there a link to the documentation for this TCAdmin SDK?

Link to comment
Share on other sites

  • 2 weeks later...

Is that the exact code you are using? You are missing a quote:

string response = (string)plugin.Execute(new Object[] { "GetGameServerStatus", IP, Port, gameID, service });

 

Enable debug mode in the monitor and restart it. You will see more information in the console so you can make sure the parameters you are sending are correct. Make sure the IP and query port is correct. Add this line after <appSettings> or set debug to True if you already have it:

<add key="TCAdmin.Debug" value="True" />

Link to comment
Share on other sites

Hi

 

The double quote was a copy paste fail. So no worries there.

 

We have debug = 1 in web.config and this is the error that gets logged from the directory below

C:\TCAdmin\Monitor.Errors.txt

 

 

Below is the error we see.

 

2011/12/29 04:37:21 PM : GameStat.ServerPlugin.GetGameServerStatus: Specified argument was out of the range of valid values.

Parameter name: type

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use