MultiConnectSDK › AI Agent Guide
9. Common mistakes
| Mistake | Correct approach |
|---|---|
Calling StartServer with Use Custom Hosting off |
Remove it. The server starts by itself on the port it is given |
Setting the room controller in Start |
Use Awake |
| Trusting data from a client | Check it on the server, especially scores, money and movement |
| Writing code on the client that decides who won | Decide on the server |
| Client and server scenes both enabled for a build | Enable only the scenes for that build |
| A missing listener | Add the listener before the message can arrive |
A message member typed object, an interface or an abstract class |
Use the concrete class: such members are not sent |
Renaming a message member without [McFormerName] |
Add [McFormerName("oldName")], so builds that still use the old name keep exchanging its value |
| Deploying a master without its game servers | They always deploy together |
| Leaving Connect To Local Server as the only test | Also test a release client against the deployment |
| A server in On demand that never ends its room | Call room.DestroyRoom(), or it runs until its lifetime limit and keeps billing |
| SDK App not set on the deployment | Clients cannot find the server. It must be the app the key came from |
A Dictionary with float or bool keys in a message |
Use string, int, long or enum keys |

