heroiclabs / nakama

Distributed server for social and realtime games and apps.
https://heroiclabs.com
Apache License 2.0
9.04k stars 1.1k forks source link

Documentation: Missing 'matchSignal' in (TypeScript) docs for authoritative matches #850

Closed Coxcopi closed 2 years ago

Coxcopi commented 2 years ago

Description

The 'bare minimum' TypeScript example in the docs is missing the 'matchSignal' constant in the registerMatch function which would not work and throw an error upon compiling.

Steps to Reproduce

  1. Go to docs: https://heroiclabs.com/docs/nakama/concepts/multiplayer/authoritative/#create-authoritative-matches
  2. Set server language to TypeScript
  3. Look at minimum match handler code example.

Expected Result

The 'register the matchhandler' section should look like this: // Register the match handler

initializer.registerMatch('lobby', {
  matchInit,
  matchJoinAttempt,
  matchJoin,
  matchLoop,
  matchLeave,
  matchTerminate,
  matchSignal
});

Actual Result

This is how it currently looks (which throws an error if copied from the example):

initializer.registerMatch('lobby', {
  matchInit,
  matchJoinAttempt,
  matchJoin,
  matchLoop,
  matchLeave,
  matchTerminate
});

Also, is there a better way of opening issues for the documentation, or is this the right way to go?

gpene commented 2 years ago

Thanks @Coxcopi , fixed 👍 .

You can report any issues or suggestions for the docs in our Forum - Documentation category.