mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 20:37:05 +02:00
DOC: Grammar and spelling fixes (#499)
This commit is contained in:
+1
-3
@@ -3,6 +3,4 @@ Hi there, hello
|
||||
|
||||
It looks like you found a page that doesn't exist!
|
||||
|
||||
If you're looking for documentation of the netscript API. It moved `here <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md>`_.
|
||||
|
||||
That documentation is autogenerated and therefore is much easier to maintain.
|
||||
If you're looking for documentation of the Netscript API, it moved `here <https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md>`_.
|
||||
@@ -19,7 +19,7 @@ Then, to fix your script, make sure you have a sleep or any other timed function
|
||||
await ns.sleep(1000); // Add a 1s sleep to prevent freezing
|
||||
}
|
||||
|
||||
Also make sure that each while loop gets to `awaited` function or `break`, for example the next snippet has a sleep
|
||||
Also make sure that each while loop gets to the `awaited` function or `break`, for example the next snippet has a sleep
|
||||
function, but it nor any possible conditional breaks are never reached and therefore will crash the game::
|
||||
|
||||
while(true) {
|
||||
@@ -33,11 +33,11 @@ function, but it nor any possible conditional breaks are never reached and there
|
||||
}
|
||||
}
|
||||
|
||||
If `n00dles` current money is, for example, 75% of the maximum money, the script will not reach neither `grow` nor `break` and crashes the game.
|
||||
Adding a sleep like in the first example, or changing the code so that `awaited` function or `break` is always reached, would prevent the crash.
|
||||
If `n00dles` current money is, for example, 75% of the maximum money, the script will reach neither `grow` nor `break` and the game will crash.
|
||||
Adding a sleep like in the first example, or changing the code so that the `awaited` function or `break` is always reached, would prevent the crash.
|
||||
|
||||
Common infinite loop when translating the server purchasing script in starting guide to :ref:`netscriptjs` is to have a
|
||||
while loop, that's condition's change is conditional::
|
||||
while loop, where the condition's change is conditional::
|
||||
|
||||
var ram = 8;
|
||||
var i = 0;
|
||||
@@ -51,7 +51,7 @@ while loop, that's condition's change is conditional::
|
||||
}
|
||||
}
|
||||
|
||||
if player does not currently have enough money to purchase a server, the `if`'s condition will be false and `++i` will not be reached.
|
||||
If the player does not currently have enough money to purchase a server, the `if`'s condition will be false and `++i` will not be reached.
|
||||
Since the script doesn't have `sleep` and value `i` will not change without the `if` being true, this will crash the game. Adding a `sleep`
|
||||
that is always reached would prevent the crash.
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ early beta stage of development. It `can be played here <https://bitburner-offic
|
||||
What is Bitburner?
|
||||
------------------
|
||||
Bitburner is a cyberpunk-themed incremental RPG where you, the player, take the role of an unknown hacker in a dark, dystopian world.
|
||||
When a mysterious hacker called jump3R messages you, he/she confirms your suspicions that there is something wrong with the world around you.
|
||||
Now, aided by jump3R, you embark on a quest to gain money and power by any means necessary, in the hopes that this will lead to to uncover the
|
||||
When a mysterious hacker called jump3R messages you, they confirm your suspicions that there is something wrong with the world around you.
|
||||
Now, aided by jump3R, you embark on a quest to gain money and power by any means necessary, in the hopes that this will lead you to uncover the
|
||||
secrets that you've been searching for.
|
||||
|
||||
.. toctree::
|
||||
|
||||
Reference in New Issue
Block a user