Fix hack all bug
This commit is contained in:
parent
f52af72140
commit
1af46c5d6f
@ -6,6 +6,7 @@ export async function main(ns: NS) {
|
||||
for (const server of servers) {
|
||||
let numThreads = ns.getServerMaxRam(server) / ns.getScriptRam("hack.js")
|
||||
numThreads = Math.floor(numThreads)
|
||||
numThreads = Math.max(numThreads, 1) // Make sure we have at least 1 thread
|
||||
executeScriptOnServerFromAnother(ns, server, "hack.js", numThreads, [server])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user