![Bitburner purchase server code](https://loka.nahovitsyn.com/85.jpg)
![bitburner purchase server code bitburner purchase server code](https://i.ytimg.com/vi/xyTQre9rg3M/maxresdefault.jpg)
And what the heck are you trying to do in the final loop? the condition (one value multiplied by 13) would always be true if it weren’t commented out. Why don’t you just use let scriptArray = to be used in ns.scp(scriptArray, hostname) ? Does need one scp instead of 3 while uploading every amount of scripts at once. At first I thought you tried to write while else (turned out to be another commented if).
![bitburner purchase server code bitburner purchase server code](https://i.stack.imgur.com/1E7jbl.png)
the linebreaks are a mess, if there are any. almost all ifs are commented out, for example. I don’t know if the website messed it up or it was user error but like this nobody can execute it. I just spent multiple minutes to fix the syntax errors before I was able to understand at least parts of it. Note: If you do not name the file servers.js, then you amend line 70 to whatever you name the file, or the rebuy function will not work. Ns.exec("yourScriptNameHere.js", hostname, 1) If you need to execute them as well, then add extra lines of Note that these will not auto-execute, they assume that your main script calls them.
#Bitburner purchase server code code
Added additional comments and MAIN_SCRIPT variable so that the code will be usable for others purchaseServer(hostname, ram) ¶ Purchased a server with the specified hostname and amount of RAM. Runs until satisfied, will rebuy servers money is sufficient and server is worse than 25% of ram. “run servers.js f”) The Script // Server purchasing script for Bitburner -, written by steamid/Meng You can force a server rebuy by running it with the ‘f’ argument (ie.
![Bitburner purchase server code](https://loka.nahovitsyn.com/85.jpg)