FeluciaPS / uopbot

Felucia's Pokémon Showdown bot
1 stars 5 forks source link

Cannot read properties of "Users" #16

Open gemclashing opened 5 years ago

gemclashing commented 5 years ago

Hello,

I joined a match and this error popped up.

[ MSG ] Joined battle-gen7randombattle-1012245896
☆O n l y I d e a

C:\Users\\Documents\uopbot-master\User.js:45
        Rooms[room].users[this.id] = this;
                    ^

TypeError: Cannot read property 'users' of undefined
    at User.join (C:\Users\\Documents\uopbot-master\User.js:45:21)
    at EventEmitter.bot.on (C:\Users\\Documents\uopbot-master\parser.js:190:23)
    at EventEmitter.emit (events.js:182:13)
    at WebSocketConnection.<anonymous> (C:\Users\\Documents\uopbot-master\app.js:56:13)
    at WebSocketConnection.emit (events.js:182:13)
    at WebSocketConnection.processFrame (C:\Users\\Documents\uopbot-master\node_modules\websocket\lib\WebSocketConnection.js:554:26)
    at C:\Users\\Documents\uopbot-master\node_modules\websocket\lib\WebSocketConnection.js:323:40
    at process._tickCallback (internal/process/next_tick.js:61:11)