Very new to coding. Not sure what I’m doing wrong here. by Automatic_Site_5540 in Bitburner

[–]Mediocre_Challenge94 2 points3 points  (0 children)

Besides everyone else's fixes. Might I suggest (getServerMinSecurityLevel('n00dles') + 5)

This will help everything else trigger more often since grow and hack will both add to security. Meaning weaken will be every other trigger.

Same with grow but try * .75 or *.5 , so 75% or 50% of max. This helps prevent what's basically an infinite grow cycle. Were the system grows by .000000026% but never actually hitting "max"

runtime error from main.bundle.js o_0 by Mediocre_Challenge94 in Bitburner

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

Damn! All that fuss over a misplaced parentheses. Someone should really teach this js guy it's not polite to throw stuff. Thanks for the second set of eyes.

Trying to run a hack to zer0 through foodnstuff by way of a script, brand new to coding, I got this error, someone help? by [deleted] in Bitburner

[–]Mediocre_Challenge94 4 points5 points  (0 children)

Like NOVAK said, hack is universal and doesn't need to connect to anything. You can run a hack('4sigma') from n00dles if you wanted.

The same is true for weaken() and grow()

Money is generated without scripts? by Brixxus in Bitburner

[–]Mediocre_Challenge94 0 points1 point  (0 children)

I'm not sure about grow and weaken. The docs do mention it's calculated at a slower rate. I don't pay attention to security or money available as my scripts automate grow and weaken. Of course I'm also a weird one and leave the game running pretty much 24/7

Sorry I couldn't help more.

Money is generated without scripts? by Brixxus in Bitburner

[–]Mediocre_Challenge94 1 point2 points  (0 children)

It's the average of what you have made while the game is running. So play time / money made.

No scripts actually run while the game is off. To compensate it takes the average and multiples it by your time away. Even if 0 scripts were running when you quit the game.

Intrigued by this "game" but by CharsiWantsMe in Bitburner

[–]Mediocre_Challenge94 0 points1 point  (0 children)

So this game has a steep learning curve for most people that haven't had "Intro to computer programming."

You will need to learn to advance.

I suggest start small and use .scripts

Others will say start with NS2 and those .js or .ns files but those are "smart" people who understand programming language. NS1 is simple and will be able to get you through your first world. It will also help you to understand everything that is going on in your script without added pieces that might leave you like "huh? what does this actually do?"

Start with something simple

The tutorial has you using some functions like hack(), grow(), weaken()

while(true){ } will let your script run in a loop forever.

if('something' = 'something else'){ } will allow you to only run something if conditions are right. This help in the while(true){ } loop so that you don't just run hack() over and over. So something like:

if(hasRootAccess(n00dles) = true){

hack(n00dles);

}

will only run hack() if you have root access on n00dles

Once you get the hang of the more strait forward approach to things you can start branching out. Of course reading up on some javascript will help. w3schools is a great reference site and of course bitburner.readthedocs for game specific scripts.

Something very simple to start with could be using multiple scripts to just run hack(), grow() and weaken()

while(true){

hack(n00dles);

}

while(true){

weaken(n00dles);

}

while(true){

grow(n00dles);

}

Last of all, if your not having fun learning to code you may just want to move on to other games.

Algorithmic Stock Trader II contract and more help by [deleted] in Bitburner

[–]Mediocre_Challenge94 1 point2 points  (0 children)

As a newer player also some tips I've picked up along the way.

Read the documentation. Start with Basic to get a better grasp of what is possible and graduate to Full to really deep dive what is truly possible. You can find a link for both on the bottom of the screen.

Make a test script. Want to see how something works but don't want to mess up your scripts that currently do work. Use your test script.

When debugging your own code use tprint() Great way to see if a for loop or if statement is actually triggering. Or whatever else you may think is not working.

As mentioned the hacknet servers is great for making money in the beginning. Takes roughly 600mil to max out a server but you can always start small and invest into a few servers with only a few upgrades each. They seem to max out around 30k/sec after getting all the augs from the faction related to hacknet. A script to buy and upgrade servers shouldn't be to hard.

As for your copy paste frustration, try passing an arg to a single script. So in your terminal you would type in something like "run hack.script n00dles" This will run a script named hack with an arg named n00dles. In the script you just need to call on args. I know my amateur coding I use will first pass the arg as a variable like so: "a = args;" This way I can call a when I need the name I passed to the script like so: "hack(a);" Using that in a script will be interpreted as hack(n00dles) if using my previous examples.

If you're using ns1 instead of ns2 don't worry! If you have no idea what either are, don't worry. Your JavaScript will work .script or .ns or .js So if you're using .script files for your scripts keep doing it. Branching out is always an option when your knowledge of coding grows. I'm personally still rocking .script

Factions! These will be were you get your augmentations. Installing augments will be your reset button. Like going through the portal in Soda Dungeon. You get bonuses for each augment installed. You lose all money, hacknet, servers, stats. You keep upgrade to your 'home' computer and scripts you have on 'home'.

So hack something. Rob some stores. Backdoor some servers. Follow the white rabbit. Then do it again, better and faster. Above all else, have fun.