OnGameRulesCreationStringChanged: missing gamerules class on the client

From Valve Developer Community
Jump to navigation Jump to search

There are a couple of reasons why this error may show up when connecting to a map.

Code Exempt

Either the client project does not include the gamerules' source code or the register code is skipped by the compiler (e.g. inside a #ifdef block).

Client Crash

A global object on the client is crashing within its constructor; this might be because the interfaces it uses are not initialized before the constructor. If the engine fails to load the mod's client.dll twice, it will load the DLL included in the mod's SteamAppId, creating a GameRules mismatch.

Thus initialisation will also fail when the client's or server's *.dll could not be copied to the /bin directory of your mod so you should also check the validity of your compiler's "output path" and the modify timestamp of your DLL's for debugging.

To fix this, the constructor code should be installed into an initialisation function. Starting a debug session for the mod might show the failure.

See also