mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
Addressing feedback.
`flags` example should have the output, instead of the code, in a comment block. `formulas.basic.calculateExp` and `formulas.basic.hackChance` should have explicit `var` declarations.
This commit is contained in:
@@ -18,8 +18,8 @@ calculateExp() Netscript Function
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
player = getPlayer();
|
||||
nextHacking = player.hacking_skill+1;
|
||||
nextExp = formulas.basic.calculateExp(nextHacking);
|
||||
missingExp = nextExp - player.hacking_exp;
|
||||
var player = getPlayer();
|
||||
var nextHacking = player.hacking_skill+1;
|
||||
var nextExp = formulas.basic.calculateExp(nextHacking);
|
||||
var missingExp = nextExp - player.hacking_exp;
|
||||
tprint("Missing " + missingExp + " to reach next hacking level");
|
||||
|
||||
@@ -20,6 +20,6 @@ hackChance() Netscript Function
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
server = getServer();
|
||||
var server = getServer();
|
||||
server.hackDifficulty = server.minDifficulty;
|
||||
tprint(formulas.basic.hackChance(server, getPlayer()));
|
||||
|
||||
Reference in New Issue
Block a user