blizzhackers / autosmurf

Dark-f version of JeanMax/Autosmurf
19 stars 21 forks source link

Unexpected character error on line 5620 in AutoSmurf.js #3

Closed Bender-TheRobot closed 4 years ago

Bender-TheRobot commented 4 years ago

09:30:13 (Bot-001) Error in AutoSmurf (autosmurf.js #5620) JSON.parse: unexpected character (Area: 40, Ping:78, Game: XXXXXX)

I keep getting this error every now and then. From watching the bot it appears to do this when it goes to buy/sell from an NPC.

Any suggestions? I am using the most recent files provided.

mf022 commented 4 years ago

Error in AutoSmurf (autosmurf.js #5620) JSON.parse: unexpected character

it's about this line? https://github.com/blizzhackers/autosmurf/blob/master/d2bs/kolbot/libs/bots/AutoSmurf.js#L5620

        let { msg, nick } = JSON.parse(data);
Bender-TheRobot commented 4 years ago

That's what it was printing to the console.

Error in AutoSmurf (autosmurf.js #5620) JSON.parse: unexpected character

mf022 commented 4 years ago

I asked Does this is your 5620 line

      let { msg, nick } = JSON.parse(data);

???

If only you are getting this, maybe it's something wrong in your files.

How did you download the d2bot-with-kolbot files? zip format or with tortoiseSVN?

Bender-TheRobot commented 4 years ago

Sorry, yes that's what my line 5620 has:

let { msg, nick } = JSON.parse(data);

I downloaded the latest version of kolbot from the SVN repo.

mf022 commented 4 years ago

and did you configure properly the autosmurf team accordingly to the guide? the exactly (case sensitive) char and the profile names?

I ask that because the Autosmurf.js lines 5619-5787 are mostly to communicate between autosmurf team. Unfortunately that was written before the releasing of the LocalChat, which may simplify it.