Open sunproc88 opened 3 years ago
when i try to start sonic, İ take this error
[Error (228)] File (kolbot/d2botsonic.dbj:83) SyntaxError: JSON.parse:unexpected character
this is the code
let SETTINGS = {};
const settingsToLegacySonicFormat = jsonObj => { return jsonObj.reduce((acc, val) => { const p = val.profile; delete val.profile;
acc[p] = JSON.parse(JSON.stringify(val)); return acc;
}, {}); };
(function(native) { include = script => { script = script.toLowerCase();
if (script === 'sonic/settings/settings.js') { SETTINGS = settingsToLegacySonicFormat( JSON.parse(FileTools.readText('libs/sonic/settings/Settings.json')) ------>>>> **this is code 83** ); return true; } else { return native(script); }
};
when i try to start sonic, İ take this error
[Error (228)] File (kolbot/d2botsonic.dbj:83) SyntaxError: JSON.parse:unexpected character
this is the code
let SETTINGS = {};
const settingsToLegacySonicFormat = jsonObj => { return jsonObj.reduce((acc, val) => { const p = val.profile; delete val.profile;
}, {}); };
(function(native) { include = script => { script = script.toLowerCase();
};