wxyz-abcd/node-haxball

error while joining rooms simultenously

Closed this issue · 1 comments

null != a && (x.Pg.appendChild(a), (x.Vm = a));

TypeError: Cannot read properties of undefined (reading 'appendChild')

When i tried joinNRandomRooms.js, got this error. Also, it triggers at start of script immediately

We have to wait for "ready" event before we can join a room:

_haxBall.on("ready", () => {
_haxBall.joinRoom({
...
});
});

Changed JoinNRooms example code accordingly.