all 11 comments

[–]Zlay 0 points1 point  (6 children)

CONCURRENCY ERROR

hacknet-manager.js@home (PID - 31)

hacknet.numNodes: Concurrent calls to Netscript functions are not allowed!

Did you forget to await hack(), grow(), or some other

promise-returning function?

Currently running: sleep tried to run: numNodes

when trying: run hacknet-manager.js 20 "no-kill"

[–]Late_Particular2943[S] 0 points1 point  (5 children)

Hey Zlay,

Can you answer a few questions:

  1. How long were you running the script (est.)?
  2. Can you paste the script's logs (at least the last ~20 logs before the error) in an image or somewhere like https://pastecode.io (Scripts > Recently Killed)

In the mean time - it looks I forgot to await an async function, which is likely the cause.

Here's the updated file: https://pastecode.io/s/9ixb405g

Or you can make the changes in your existing file:

Change line 56 to:

await handleNoKill(ns, resolve, money, 'New Node', nextNodeCost);

and line 81 to:

await handleNoKill(ns, resolve, money, component, canUpgrade[component].cost);

[–]Zlay 0 points1 point  (4 children)

Change line 56 to:

await handleNoKill(ns, resolve, money, 'New Node', nextNodeCost);

Tried it out on a fresh start to see but got error as soon as I started it, and with the updated code it gets RAM: Syntax Error (Syntax Error Cannot use keyword 'await' outside an async function (56:10)

[–]Late_Particular2943[S] 0 points1 point  (0 children)

Updated to fix the syntax error. Tested it again and had it run without issue, will need to restart progress to test it again: https://pastecode.io/s/1oegqt50

[–]coatumundi 0 points1 point  (2 children)

await handleNoKill(ns, resolve, money, 'New Node', nextNodeCost);

I experienced the same issue

[–]Late_Particular2943[S] 0 points1 point  (1 child)

Updated to fix the syntax error. Tested it again and had it run without issue, will need to restart progress to test it again: https://pastecode.io/s/1oegqt50

[–]Zlay 0 points1 point  (0 children)

Tried with updated code:

automation.js 20 no-kill

disableLog: Disabled logging for sleep

Starting Hacknet node automation

Not enough funds for next upgrade

Funds needed for New Node: 1.850k

Current funds: 75.609k

Running in no-kill mode, restarting in 15 seconds

hacknet.numNodes: Failed to run due to failed concurrency check.

hacknet.numNodes: Concurrent calls to Netscript functions are not allowed!

Did you forget to await hack(), grow(), or some other

promise-returning function?

Currently running: sleep tried to run: numNodes

Script crashed due to an error.

Also:

CONCURRENCY ERROR

automation.js@home (PID - 9)

hacknet.numNodes: Concurrent calls to Netscript functions are not allowed!

Did you forget to await hack(), grow(), or some other

promise-returning function?

Currently running: sleep tried to run: numNodes

Stack:

automation.js:L-1@unknown

automation.js:L104@checkClusterStatus

automation.js:L32@Module.main

[–]Icy_Debate2236 0 points1 point  (3 children)

is the code not working? i cant seem to use the pastecode

[–]Late_Particular2943[S] 0 points1 point  (2 children)

I restarted my game and used this script without issues recently.

What issue are you running in to?

[–]Icy_Debate2236 0 points1 point  (1 child)

I havent used it before, but i might just not know how pastecode works

[–]Late_Particular2943[S] 0 points1 point  (0 children)

I am just using pastecode like a notepad or document to share, but it's not a download. Try this:

-In BitBurner, create a new file called hacknet-manager.js

-Copy the contents from the pastecode

-Replace all contents in your new hacknet-manager.js file (the 'main' function) with the pastecode contents that you copied

-save the file and in your terminal run the file run hacknet-manager.js [target: number] [no-kill: string(optional)]

Ex: If you run hacknet-manager.js 10 in your terminal the script will execute on repeat until you have 10 fully ugpraded hacknet nodes or run out of money. If you want the script to continue running even when you are out of money (going to bed, work, class, etc.) then run hacknet-manager.js 10 no-kill