Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Also I didn't know Javascript before I wrote it, and taught myself it while writing the code, hence anything you say is probably correct and/or better. Feel free to copy paste it into a better guide (then I'll delete this one) - I give full permission.
if (lvlbladein*2<lvloverc || lvldigital*2<lvloverc || lvloverc==90 ){
var skautonam="Digital Observer"; } else { var skautonam="Overclock"; }
//If chosen skill higher than Blade's Intuition, choose Blade
if ( lvldigital*3 > lvlbladein*4 || lvloverc > lvlbladein ) { var skautonam="Blade\'s Intuition"; } else { var skautonam="Digital Observer"; }
Cannot read properties of undefined (reading '0') = join BB and then run code.
Biggest change:
when finding best Con or Op
bestCon = Cont.reduce((a, b) => compare(ns,"contracts",a,b));
I replace with compare() => prioritizes higher jobs with min. suc. %
function compare(ns,type,a,b){
if(a.counts < 1 ){
return b;
}
if(b.counts < 1 ){
return a;
}
var valA = getVal(ns,type,a);
var valB = getVal(ns,type,b);
if(valA > valB){return a}
else if(valA < valB){return b}
else{
return (aveChance(a.chance) > aveChance(b.chance) ) ? a : b
}
}
function getVal(ns,type, a){
if(type == "operations"){
if(a.name == operations[5] && aveChance(a.chance) > minsuccess){
return 4;
repeat 4,1 and 0
}else{
return 0;
}
}else{
if(a.name == contracts[2] && aveChance(a.chance) > minsuccess){
return 3;
repeat 1 and 0
}else{
return 0;
}
}
RUNTIME ERROR
bladeburners.js@home (PID - 13330)
Cannot read properties of undefined (reading '0')
stack:
TypeError: Cannot read properties of undefined (reading '0')
at home/bladeburners.js:355:44
at Array.reduce (<anonymous>)
at work (home/bladeburners.js:355:16)
at async Module.main (home/bladeburners.js:797:3)
at async T (file:///F:/SteamGames/steamapps/common/Bitburner/resources/app/dist/main.bundle.js:2:1049459)
Do you have any idea on how to fix this?
"...
c100.0-100.0 o100.0-100.0 b95.6
⛗⛗0.04 c0.0% o0.0% b4.4%
undefined
🚶: Field A. (Black Ops) >30s"
It's looped a few times through it already, and it keeps reappearing for now.
I'm also not sure why you sleep(200) early on. Seems like a forced delay for no good reason. Maybe it's needed in a certain situation, but I'd rather only do it then...
The error was .length didn't exist on the structure it saw. I wonder if the result was an error instead of the expected list of augs?