blizzhackers / kolbot

d2bs: core + d2bot (noah) + kolbot libs (kolton) | January 2020's clone of https://github.com/kolton/d2bot-with-kolbot/ + further development
244 stars 158 forks source link

strict warning error misc.js line 2009 and loader.js line 54 #288

Closed JPL56 closed 2 years ago

JPL56 commented 2 years ago

strict warning referenced from line 54 of loader.js copy[i] = this.clone(obj[i]); } strict warning referenced from line 2009 of misc.js copy[i] = this.clone(obj[i]); }

jaenster commented 2 years ago

Strict warnings are annoying because technically it's not incorrect and/or a big deal in modern javascript.

Its compiled with a too strict setting, which is not something we can change easily.

Do you use custom configs somewhere for scripts?

JPL56 commented 2 years ago

i think these are default files

jaenster commented 2 years ago

i think these are default files

And its coping your config, so please share your config

JPL56 commented 2 years ago

my paladin config file? he is the one with those 2 strict warnings

JPL56 commented 2 years ago

// Paladin config file

/* Brief instructions:

function LoadConfig() { /* Sequence config

JPL56 commented 2 years ago

This text window didn't allow to drop the file so the colors and line numerals aren't present. Sorry

jaenster commented 2 years ago

You messed up the AttackSkill[6] on line 509, it suposed to be [5].

Its trying to write to an element that doesnt exists

JPL56 commented 2 years ago

thanks

JPL56 commented 2 years ago

I don't recall changing that number but both warnings discontinued 👍

jaenster commented 2 years ago

Actually the array is messed up;

from paladin.js


    Config.AttackSkill[0] = -1; // Preattack skill.
    Config.AttackSkill[1] = -1; // Primary skill to bosses.
    Config.AttackSkill[2] = -1; // Primary aura to bosses
    Config.AttackSkill[3] = -1; // Primary skill to others.
    Config.AttackSkill[4] = -1; // Primary aura to others.
    Config.AttackSkill[5] = -1; // Secondary skill if monster is immune to primary.
    Config.AttackSkill[6] = -1; // Secondary aura.

maybe just redo the block :)

JPL56 commented 2 years ago

I did after I looked at my paladins past and found a line missing. I must have hit backspace after highlighting the line. No more strict warning messages but it still wont follow as mfhelper. If I dig through past working configs I might find that issue.