rameshvarun / showdownbot

A Pokemon Showdown battling AI.
68 stars 27 forks source link

Crash after starting battle #6

Open CatFart opened 4 years ago

CatFart commented 4 years ago

I get this error everytime i start a battle.

SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at constructor.recieve (showdownbot-master 2/battleroom.js:498:45) at recieve (showdownbot-master 2/bot.js:203:18) at EventEmitter.<anonymous> (showdownbot-master 2/bot.js:279:3) at EventEmitter.emit (events.js:198:13) at WebSocketTransport.<anonymous> (showdownbot-master 2/node_modules/sockjs-client-ws/lib/sockjs-client.js:112:20) at WebSocketTransport.emit (events.js:198:13) at WebSocketTransport._dispatchMessage (showdownbot-master 2/node_modules/sockjs-client-ws/lib/WebSocketTransport.js:89:17) at WebSocketTransport.onData (showdownbot-master 2/node_modules/sockjs-client-ws/lib/WebSocketTransport.js:56:16) at WebSocket.<anonymous> (showdownbot-master 2/node_modules/sockjs-client-ws/lib/WebSocketTransport.js:3:59)

CatFart commented 4 years ago

A tad easier to read https://pastebin.com/P3KkD2gR

amharfm commented 4 years ago

Hey btw I have finished updating rameshvarun's code to be applied in current Pokemon showdown version (Zarel's) (October 2019). How should I offer a merge to this version? regards, amhar