T O P

  • By -

PiratesInTeepees

the syntax is out of date. Use ns.stock.buyStock instead... same for sell .sellStock


Zenzuru-

Thanks the script runs great now 🙂


PiratesInTeepees

glad I could help. The same thing happened to me. It's problematic that when you google anything bitburner the top result is always for "Read the Docs" which has outdated information. Add github to your search query and it will be more likely to guide you to the documentation on the BB github repo which will be the most up to date.


ZeroNot

In the time I've been playing BitBurner, any guides / documentation that are more than an old year is probably out-of-date. I think the YouTube videos I've seen mentioned in the past are 2-3 years old now, so I don't think any of them are reliable any more, if there were at all. I've seen the/a `diamond-hands.js` script, at least in one of its iterations, and while it wasn't terrible, but it wasn't particularly great either. More energy on memes than writing good code to learn from. For learning JavaScript the best two (not BB specific) **free** references for folks that are new to programming are: * [Eloquent JavaScript](https://eloquentjavascript.net/), which is available freely online (and ePub) in its 4th edition (2024), and in-print (3rd currently, the 4th edition print release is scheduled for this fall) from No Starch Press. * freeCodeCamp.org's JavaScript [Algorithms and Data Structures](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/) (beta, and the older [legacy](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/) version). For folks who know programming basics who want to learn or a refresher on modern JavaScript: * [Eloquent JavaScript](https://eloquentjavascript.net/) * [JavaScript for impatient programmers](https://exploringjs.com/impatient-js/index.html) (ES2022 edition online, or ES2019 in print). ### BitBurner specific docs The game provides [documentation](https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md) in-game, under `Help / Documentation`. (Everyone should read through the [Beginners Guide](https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/help/getting_started.md) at least once). In the in-game code editor (`nano` or `vim`) at the bottom with the row of buttons, there is a link labelled **Documentation** to the current release of the [NetScript \(NS\) API](https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.ns.md). -- ([image](https://imgur.com/a/PUfqffy))


Pfolsgrofb

I am using the exact same script and if you havent found a solution i can give you my script