Server: Incorrect GetServerInfo2 indexes

Topics: Admin Tool, Developers
Jan 20, 2012 at 4:50 PM
Edited Jan 20, 2012 at 4:52 PM
Hi :)
Many indexes in Server.cs is off.
Eg. if I run Uptime method, then it tries to return the level_name (and this 
throws and exception).
So changing the index from 5 till 16 fixes it...
 public TimeSpan Uptime
 {
    get
    {
        int sec = GetServerInfo2(16).ToInt32();
        return sec == -1 ? TimeSpan.Zero : new TimeSpan(0, 0, sec);
    }
}
This is a problem in several of the GetServerInfo2-indexes.
:)
Mojo


Coordinator
Jan 21, 2012 at 1:39 PM

I forgot to transform the index before retrieving the value. GetServerInfo2 should now work correctly.

Jan 21, 2012 at 1:49 PM
Edited Jan 21, 2012 at 1:49 PM

Hehe .. I just found the "bug" myself and wanted to post it here - but you beat me! :)

Nice thanks!!!