moriakaice / bitburner

Collection of scripts for https://danielyxie.github.io/bitburner/
ISC License
117 stars 143 forks source link

playerServers.js #34

Open drstattik-dev opened 1 year ago

drstattik-dev commented 1 year ago

had an issue with playerServers.js buying the lowest level server when I could afford more. This may not be the intended way but it worked for me. at line 133 I changed: let biggestCurrentServer = (ns.getServerMaxRam(purchasedServers[purchasedServers.length - 1]), ns.getServerUsedRam(purchasedServers[purchasedServers.length - 1])) to let biggestCurrentServer = Math.max(ns.getServerMaxRam(purchasedServers[purchasedServers.length - 1]), ns.getServerUsedRam(purchasedServers[purchasedServers.length - 1]))