Forum C# InvalidGameCode

InvalidGameCode

Postby lauromrcruz » January 14th, 2016, 6:06 pm

Hi

I'm receiving these error message when I try to run the game:

"PlayerIOClient.PlayerIOError: InvalidGameCode;
The game code contains contains the following errors and will not be loaded: [
Server.dll: Server.DataAccess.BigDBUserCardsAccessImpl/<>c..cctor() is static -- Static constructors are disallowed.,
Server.dll: Server.MatchRoom.MatchPlayerRobotMirror/<>c..cctor() is static -- Static constructors are disallowed.,
Server.dll: Server.ControlRoom.Connection/<>c..cctor() is static -- Static constructors are disallowed.,
Server.dll: GoK.Entities.MatchUseRules/<>c..cctor() is static -- Static constructors are disallowed.,
Server.dll: GoK.Entities.Match/<>c..cctor() is static -- Static constructors are disallowed.
]"

I'm using the SDK v3.2.460
There are 2 problems:

1 - when I use the local server these error does not happen
2 - Those classes does not have static constructors.

Can anyone help me?
lauromrcruz
 
Posts: 21
Joined: July 10th, 2013, 3:02 pm

Re: InvalidGameCode

Postby lauromrcruz » January 14th, 2016, 10:28 pm

Just to add more information

When is failing I'm using : Viasula Studio Community 2015

but if I compile the server with: Visual Studio Express 2012 for Windows Desktop, it does work
lauromrcruz
 
Posts: 21
Joined: July 10th, 2013, 3:02 pm

Re: InvalidGameCode

Postby CJMaeder » January 19th, 2016, 11:31 pm

I just had the same issue.
Removing all the delegates and replacing them with functions fixed it for me.
CJMaeder
 
Posts: 3
Joined: May 4th, 2014, 6:39 am

Re: InvalidGameCode

Postby Guillaume » February 10th, 2016, 10:03 pm

I'm pretty sure that this is because Delegate function are managed differently since Visual Studio 2015, as it's using the new open source .NET Compiler, "Roslyn" instead of the legacy Compiler used on previous versions.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France


Return to C#