Describe the bug
player.getName is not a function
occurs if the player is not in a valid room.
To Reproduce
Add player to an invalid room. The logging and output to player fails due to this bug, the server console displays the above error message.
Expected behavior
Correct logging should be output to server and a sensible error message to the player as well.
Can be fixed by using player.name
Error logs
player.getName is not a function